ripple 0.3.67 → 0.3.69
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/CHANGELOG.md +57 -0
- package/package.json +3 -3
- package/src/jsx-runtime.d.ts +2 -2
- package/src/runtime/element.js +1 -1
- package/src/runtime/index-client.js +11 -11
- package/src/runtime/index-server.js +7 -4
- package/src/runtime/internal/client/bindings.js +1 -1
- package/src/runtime/internal/client/blocks.js +13 -4
- package/src/runtime/internal/client/component.js +55 -0
- package/src/runtime/internal/client/composite.js +4 -2
- package/src/runtime/internal/client/expression.js +65 -7
- package/src/runtime/internal/client/hmr.js +54 -43
- package/src/runtime/internal/client/index.js +5 -1
- package/src/runtime/internal/client/portal.js +70 -69
- package/src/runtime/internal/client/render.js +3 -0
- package/src/runtime/internal/server/index.js +92 -8
- package/tests/client/__snapshots__/html.test.tsrx.snap +3 -3
- package/tests/client/array/array.copy-within.test.tsrx +33 -31
- package/tests/client/array/array.derived.test.tsrx +186 -169
- package/tests/client/array/array.iteration.test.tsrx +40 -37
- package/tests/client/array/array.mutations.test.tsrx +113 -101
- package/tests/client/array/array.static.test.tsrx +119 -101
- package/tests/client/array/array.to-methods.test.tsrx +24 -21
- package/tests/client/async-suspend.test.tsrx +247 -246
- package/tests/client/basic/__snapshots__/basic.rendering.test.tsrx.snap +0 -1
- package/tests/client/basic/basic.attributes.test.tsrx +428 -423
- package/tests/client/basic/basic.collections.test.tsrx +109 -102
- package/tests/client/basic/basic.components.test.tsrx +323 -205
- package/tests/client/basic/basic.errors.test.tsrx +91 -91
- package/tests/client/basic/basic.events.test.tsrx +114 -115
- package/tests/client/basic/basic.get-set.test.tsrx +97 -87
- package/tests/client/basic/basic.hmr.test.tsrx +19 -16
- package/tests/client/basic/basic.reactivity.test.tsrx +199 -191
- package/tests/client/basic/basic.rendering.test.tsrx +272 -182
- package/tests/client/basic/basic.styling.test.tsrx +23 -22
- package/tests/client/basic/basic.utilities.test.tsrx +10 -8
- package/tests/client/boundaries.test.tsrx +26 -26
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.rsrx.snap +5 -5
- package/tests/client/compiler/__snapshots__/compiler.assignments.test.tsrx.snap +5 -5
- package/tests/client/compiler/compiler.assignments.test.tsrx +77 -81
- package/tests/client/compiler/compiler.attributes.test.tsrx +15 -15
- package/tests/client/compiler/compiler.basic.test.tsrx +322 -314
- package/tests/client/compiler/compiler.regex.test.tsrx +44 -47
- package/tests/client/compiler/compiler.tracked-access.test.tsrx +38 -38
- package/tests/client/compiler/compiler.try-in-function.test.tsrx +16 -16
- package/tests/client/compiler/compiler.typescript.test.tsrx +2 -2
- package/tests/client/composite/composite.dynamic-components.test.tsrx +47 -48
- package/tests/client/composite/composite.generics.test.tsrx +168 -192
- package/tests/client/composite/composite.props.test.tsrx +97 -81
- package/tests/client/composite/composite.reactivity.test.tsrx +177 -147
- package/tests/client/composite/composite.render.test.tsrx +122 -105
- package/tests/client/computed-properties.test.tsrx +28 -28
- package/tests/client/context.test.tsrx +21 -21
- package/tests/client/css/global-additional-cases.test.tsrx +58 -58
- package/tests/client/css/global-advanced-selectors.test.tsrx +16 -16
- package/tests/client/css/global-at-rules.test.tsrx +10 -10
- package/tests/client/css/global-basic.test.tsrx +14 -14
- package/tests/client/css/global-classes-ids.test.tsrx +14 -14
- package/tests/client/css/global-combinators.test.tsrx +10 -10
- package/tests/client/css/global-complex-nesting.test.tsrx +14 -14
- package/tests/client/css/global-edge-cases.test.tsrx +18 -18
- package/tests/client/css/global-keyframes.test.tsrx +12 -12
- package/tests/client/css/global-nested.test.tsrx +10 -10
- package/tests/client/css/global-pseudo.test.tsrx +12 -12
- package/tests/client/css/global-scoping.test.tsrx +20 -20
- package/tests/client/css/style-identifier.test.tsrx +143 -291
- package/tests/client/date.test.tsrx +146 -133
- package/tests/client/dynamic-elements.test.tsrx +398 -365
- package/tests/client/events.test.tsrx +292 -290
- package/tests/client/for.test.tsrx +156 -153
- package/tests/client/head.test.tsrx +105 -96
- package/tests/client/html.test.tsrx +122 -26
- package/tests/client/input-value.test.tsrx +1361 -1314
- package/tests/client/lazy-array.test.tsrx +16 -13
- package/tests/client/lazy-destructuring.test.tsrx +257 -213
- package/tests/client/map.test.tsrx +65 -60
- package/tests/client/media-query.test.tsrx +22 -20
- package/tests/client/object.test.tsrx +87 -81
- package/tests/client/portal.test.tsrx +57 -51
- package/tests/client/ref.test.tsrx +233 -202
- package/tests/client/return.test.tsrx +71 -2560
- package/tests/client/set.test.tsrx +54 -45
- package/tests/client/svg.test.tsrx +216 -186
- package/tests/client/switch.test.tsrx +194 -193
- package/tests/client/track-async-hydration.test.tsrx +18 -14
- package/tests/client/tracked-index-access.test.tsrx +28 -18
- package/tests/client/try.test.tsrx +675 -548
- package/tests/client/tsx.test.tsrx +373 -311
- package/tests/client/typescript-generics.test.tsrx +145 -145
- package/tests/client/url/url.derived.test.tsrx +33 -28
- package/tests/client/url/url.parsing.test.tsrx +61 -51
- package/tests/client/url/url.partial-removal.test.tsrx +56 -48
- package/tests/client/url/url.reactivity.test.tsrx +142 -125
- package/tests/client/url/url.serialization.test.tsrx +13 -11
- package/tests/client/url-search-params/url-search-params.derived.test.tsrx +34 -29
- package/tests/client/url-search-params/url-search-params.initialization.test.tsrx +25 -21
- package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +50 -45
- package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +111 -99
- package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +49 -43
- package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +14 -12
- package/tests/client/url-search-params/url-search-params.tracked-url.test.tsrx +16 -14
- package/tests/hydration/basic.test.js +3 -3
- package/tests/hydration/compiled/client/basic.js +586 -651
- package/tests/hydration/compiled/client/composite.js +79 -104
- package/tests/hydration/compiled/client/events.js +140 -148
- package/tests/hydration/compiled/client/for.js +1005 -1018
- package/tests/hydration/compiled/client/head.js +124 -134
- package/tests/hydration/compiled/client/hmr.js +41 -48
- package/tests/hydration/compiled/client/html-in-template.js +38 -41
- package/tests/hydration/compiled/client/html.js +970 -1314
- package/tests/hydration/compiled/client/if-children.js +234 -249
- package/tests/hydration/compiled/client/if.js +182 -189
- package/tests/hydration/compiled/client/mixed-control-flow.js +347 -303
- package/tests/hydration/compiled/client/nested-control-flow.js +1084 -832
- package/tests/hydration/compiled/client/portal.js +65 -85
- package/tests/hydration/compiled/client/reactivity.js +84 -90
- package/tests/hydration/compiled/client/return.js +38 -1939
- package/tests/hydration/compiled/client/switch.js +218 -224
- package/tests/hydration/compiled/client/track-async-serialization.js +250 -259
- package/tests/hydration/compiled/client/try.js +123 -132
- package/tests/hydration/compiled/server/basic.js +773 -831
- package/tests/hydration/compiled/server/composite.js +166 -191
- package/tests/hydration/compiled/server/events.js +170 -184
- package/tests/hydration/compiled/server/for.js +851 -909
- package/tests/hydration/compiled/server/head.js +206 -216
- package/tests/hydration/compiled/server/hmr.js +64 -72
- package/tests/hydration/compiled/server/html-in-template.js +42 -76
- package/tests/hydration/compiled/server/html.js +1362 -1667
- package/tests/hydration/compiled/server/if-children.js +419 -445
- package/tests/hydration/compiled/server/if.js +194 -208
- package/tests/hydration/compiled/server/mixed-control-flow.js +249 -257
- package/tests/hydration/compiled/server/nested-control-flow.js +491 -515
- package/tests/hydration/compiled/server/portal.js +152 -160
- package/tests/hydration/compiled/server/reactivity.js +94 -106
- package/tests/hydration/compiled/server/return.js +28 -2172
- package/tests/hydration/compiled/server/switch.js +274 -286
- package/tests/hydration/compiled/server/track-async-serialization.js +340 -358
- package/tests/hydration/compiled/server/try.js +167 -185
- package/tests/hydration/components/basic.tsrx +320 -272
- package/tests/hydration/components/composite.tsrx +44 -32
- package/tests/hydration/components/events.tsrx +101 -91
- package/tests/hydration/components/for.tsrx +510 -452
- package/tests/hydration/components/head.tsrx +87 -80
- package/tests/hydration/components/hmr.tsrx +22 -17
- package/tests/hydration/components/html-in-template.tsrx +22 -17
- package/tests/hydration/components/html.tsrx +525 -443
- package/tests/hydration/components/if-children.tsrx +158 -148
- package/tests/hydration/components/if.tsrx +109 -95
- package/tests/hydration/components/mixed-control-flow.tsrx +100 -96
- package/tests/hydration/components/nested-control-flow.tsrx +215 -203
- package/tests/hydration/components/portal.tsrx +41 -34
- package/tests/hydration/components/reactivity.tsrx +37 -27
- package/tests/hydration/components/return.tsrx +12 -556
- package/tests/hydration/components/switch.tsrx +120 -114
- package/tests/hydration/components/track-async-serialization.tsrx +107 -91
- package/tests/hydration/components/try.tsrx +55 -40
- package/tests/hydration/html.test.js +4 -4
- package/tests/hydration/return.test.js +13 -532
- package/tests/server/await.test.tsrx +3 -3
- package/tests/server/basic.attributes.test.tsrx +264 -195
- package/tests/server/basic.components.test.tsrx +296 -169
- package/tests/server/basic.test.tsrx +300 -198
- package/tests/server/compiler.test.tsrx +62 -60
- package/tests/server/composite.props.test.tsrx +77 -63
- package/tests/server/composite.test.tsrx +168 -192
- package/tests/server/context.test.tsrx +18 -12
- package/tests/server/dynamic-elements.test.tsrx +197 -180
- package/tests/server/for.test.tsrx +85 -78
- package/tests/server/head.test.tsrx +50 -43
- package/tests/server/html-nesting-validation.test.tsrx +8 -8
- package/tests/server/if.test.tsrx +57 -51
- package/tests/server/lazy-destructuring.test.tsrx +366 -294
- package/tests/server/return.test.tsrx +76 -1355
- package/tests/server/streaming-ssr.test.tsrx +4 -75
- package/tests/server/style-identifier.test.tsrx +169 -148
- package/tests/server/switch.test.tsrx +91 -85
- package/tests/server/track-async-serialization.test.tsrx +105 -85
- package/tests/server/try.test.tsrx +374 -280
- package/tests/utils/compiler-compat-config.test.js +2 -2
- package/tests/utils/runtime-imports.test.js +10 -0
- package/types/index.d.ts +8 -0
- package/tests/client/__snapshots__/html.test.rsrx.snap +0 -40
|
@@ -4,1391 +4,1333 @@ import * as _$_ from 'ripple/internal/server';
|
|
|
4
4
|
import { track } from 'ripple/server';
|
|
5
5
|
|
|
6
6
|
export function StaticForLoop() {
|
|
7
|
-
_$_.
|
|
7
|
+
return _$_.tsrx_element(() => {
|
|
8
|
+
const items = ['Apple', 'Banana', 'Cherry'];
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
_$_.regular_block(() => {
|
|
11
|
+
_$_.output_push('<ul');
|
|
12
|
+
_$_.output_push('>');
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
_$_.output_push('>');
|
|
14
|
+
{
|
|
15
|
+
_$_.output_push('<!--[-->');
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
for (const item of items) {
|
|
18
|
+
_$_.output_push('<li');
|
|
19
|
+
_$_.output_push('>');
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
{
|
|
22
|
+
_$_.output_push(_$_.escape(item));
|
|
23
|
+
}
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
_$_.output_push(_$_.escape(item));
|
|
25
|
+
_$_.output_push('</li>');
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
_$_.output_push('
|
|
28
|
+
_$_.output_push('<!--]-->');
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
_$_.output_push('
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
_$_.output_push('</ul>');
|
|
31
|
+
_$_.output_push('</ul>');
|
|
32
|
+
});
|
|
33
33
|
});
|
|
34
|
-
|
|
35
|
-
_$_.pop_component();
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
export function ForLoopWithIndex() {
|
|
39
|
-
_$_.
|
|
37
|
+
return _$_.tsrx_element(() => {
|
|
38
|
+
const items = ['A', 'B', 'C'];
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
_$_.regular_block(() => {
|
|
41
|
+
_$_.output_push('<ul');
|
|
42
|
+
_$_.output_push('>');
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_$_.output_push('>');
|
|
44
|
+
{
|
|
45
|
+
_$_.output_push('<!--[-->');
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
_$_.output_push('<!--[-->');
|
|
47
|
+
var i = 0;
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
for (const item of items) {
|
|
50
|
+
_$_.output_push('<li');
|
|
51
|
+
_$_.output_push('>');
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
{
|
|
54
|
+
_$_.output_push(_$_.escape(`${i}: ${item}`));
|
|
55
|
+
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
_$_.output_push('</li>');
|
|
58
|
+
i++;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
_$_.output_push('
|
|
61
|
-
i++;
|
|
61
|
+
_$_.output_push('<!--]-->');
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
_$_.output_push('
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
_$_.output_push('</ul>');
|
|
64
|
+
_$_.output_push('</ul>');
|
|
65
|
+
});
|
|
68
66
|
});
|
|
69
|
-
|
|
70
|
-
_$_.pop_component();
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
export function KeyedForLoop() {
|
|
74
|
-
_$_.
|
|
70
|
+
return _$_.tsrx_element(() => {
|
|
71
|
+
const items = [
|
|
72
|
+
{ id: 1, name: 'First' },
|
|
73
|
+
{ id: 2, name: 'Second' },
|
|
74
|
+
{ id: 3, name: 'Third' }
|
|
75
|
+
];
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{ id: 3, name: 'Third' }
|
|
80
|
-
];
|
|
77
|
+
_$_.regular_block(() => {
|
|
78
|
+
_$_.output_push('<ul');
|
|
79
|
+
_$_.output_push('>');
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
_$_.output_push('>');
|
|
81
|
+
{
|
|
82
|
+
_$_.output_push('<!--[-->');
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
for (const item of items) {
|
|
85
|
+
_$_.output_push('<li');
|
|
86
|
+
_$_.output_push('>');
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
{
|
|
89
|
+
_$_.output_push(_$_.escape(item.name));
|
|
90
|
+
}
|
|
92
91
|
|
|
93
|
-
|
|
94
|
-
_$_.output_push(_$_.escape(item.name));
|
|
92
|
+
_$_.output_push('</li>');
|
|
95
93
|
}
|
|
96
94
|
|
|
97
|
-
_$_.output_push('
|
|
95
|
+
_$_.output_push('<!--]-->');
|
|
98
96
|
}
|
|
99
97
|
|
|
100
|
-
_$_.output_push('
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
_$_.output_push('</ul>');
|
|
98
|
+
_$_.output_push('</ul>');
|
|
99
|
+
});
|
|
104
100
|
});
|
|
105
|
-
|
|
106
|
-
_$_.pop_component();
|
|
107
101
|
}
|
|
108
102
|
|
|
109
103
|
export function ReactiveForLoopAdd() {
|
|
110
|
-
_$_.
|
|
104
|
+
return _$_.tsrx_element(() => {
|
|
105
|
+
let lazy = _$_.track(['A', 'B'], 'e145678a');
|
|
111
106
|
|
|
112
|
-
|
|
107
|
+
_$_.regular_block(() => {
|
|
108
|
+
_$_.output_push('<button');
|
|
109
|
+
_$_.output_push(' class="add"');
|
|
110
|
+
_$_.output_push('>');
|
|
113
111
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
_$_.output_push('>');
|
|
112
|
+
{
|
|
113
|
+
_$_.output_push('Add');
|
|
114
|
+
}
|
|
118
115
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
116
|
+
_$_.output_push('</button>');
|
|
117
|
+
});
|
|
122
118
|
|
|
123
|
-
_$_.
|
|
124
|
-
|
|
119
|
+
_$_.regular_block(() => {
|
|
120
|
+
_$_.output_push('<ul');
|
|
121
|
+
_$_.output_push('>');
|
|
125
122
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
_$_.output_push('>');
|
|
123
|
+
{
|
|
124
|
+
_$_.output_push('<!--[-->');
|
|
129
125
|
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
for (const item of lazy.value) {
|
|
127
|
+
_$_.output_push('<li');
|
|
128
|
+
_$_.output_push('>');
|
|
132
129
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
{
|
|
131
|
+
_$_.output_push(_$_.escape(item));
|
|
132
|
+
}
|
|
136
133
|
|
|
137
|
-
|
|
138
|
-
_$_.output_push(_$_.escape(item));
|
|
134
|
+
_$_.output_push('</li>');
|
|
139
135
|
}
|
|
140
136
|
|
|
141
|
-
_$_.output_push('
|
|
137
|
+
_$_.output_push('<!--]-->');
|
|
142
138
|
}
|
|
143
139
|
|
|
144
|
-
_$_.output_push('
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
_$_.output_push('</ul>');
|
|
140
|
+
_$_.output_push('</ul>');
|
|
141
|
+
});
|
|
148
142
|
});
|
|
149
|
-
|
|
150
|
-
_$_.pop_component();
|
|
151
143
|
}
|
|
152
144
|
|
|
153
145
|
export function ReactiveForLoopRemove() {
|
|
154
|
-
_$_.
|
|
146
|
+
return _$_.tsrx_element(() => {
|
|
147
|
+
let lazy_1 = _$_.track(['A', 'B', 'C'], 'b4e9bd54');
|
|
155
148
|
|
|
156
|
-
|
|
149
|
+
_$_.regular_block(() => {
|
|
150
|
+
_$_.output_push('<button');
|
|
151
|
+
_$_.output_push(' class="remove"');
|
|
152
|
+
_$_.output_push('>');
|
|
157
153
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
_$_.output_push('>');
|
|
154
|
+
{
|
|
155
|
+
_$_.output_push('Remove');
|
|
156
|
+
}
|
|
162
157
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
158
|
+
_$_.output_push('</button>');
|
|
159
|
+
});
|
|
166
160
|
|
|
167
|
-
_$_.
|
|
168
|
-
|
|
161
|
+
_$_.regular_block(() => {
|
|
162
|
+
_$_.output_push('<ul');
|
|
163
|
+
_$_.output_push('>');
|
|
169
164
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
_$_.output_push('>');
|
|
165
|
+
{
|
|
166
|
+
_$_.output_push('<!--[-->');
|
|
173
167
|
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
for (const item of lazy_1.value) {
|
|
169
|
+
_$_.output_push('<li');
|
|
170
|
+
_$_.output_push('>');
|
|
176
171
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
{
|
|
173
|
+
_$_.output_push(_$_.escape(item));
|
|
174
|
+
}
|
|
180
175
|
|
|
181
|
-
|
|
182
|
-
_$_.output_push(_$_.escape(item));
|
|
176
|
+
_$_.output_push('</li>');
|
|
183
177
|
}
|
|
184
178
|
|
|
185
|
-
_$_.output_push('
|
|
179
|
+
_$_.output_push('<!--]-->');
|
|
186
180
|
}
|
|
187
181
|
|
|
188
|
-
_$_.output_push('
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
_$_.output_push('</ul>');
|
|
182
|
+
_$_.output_push('</ul>');
|
|
183
|
+
});
|
|
192
184
|
});
|
|
193
|
-
|
|
194
|
-
_$_.pop_component();
|
|
195
185
|
}
|
|
196
186
|
|
|
197
187
|
export function ForLoopInteractive() {
|
|
198
|
-
_$_.
|
|
199
|
-
|
|
200
|
-
let lazy_2 = _$_.track([0, 0, 0], '36f563df');
|
|
188
|
+
return _$_.tsrx_element(() => {
|
|
189
|
+
let lazy_2 = _$_.track([0, 0, 0], '36f563df');
|
|
201
190
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
{
|
|
207
|
-
_$_.output_push('<!--[-->');
|
|
191
|
+
_$_.regular_block(() => {
|
|
192
|
+
_$_.output_push('<div');
|
|
193
|
+
_$_.output_push('>');
|
|
208
194
|
|
|
209
|
-
|
|
195
|
+
{
|
|
196
|
+
_$_.output_push('<!--[-->');
|
|
210
197
|
|
|
211
|
-
|
|
212
|
-
_$_.output_push('<div');
|
|
213
|
-
_$_.output_push(_$_.attr('class', `item-${i}`));
|
|
214
|
-
_$_.output_push('>');
|
|
198
|
+
var i = 0;
|
|
215
199
|
|
|
216
|
-
{
|
|
217
|
-
_$_.output_push('<
|
|
218
|
-
_$_.output_push('
|
|
200
|
+
for (const count of lazy_2.value) {
|
|
201
|
+
_$_.output_push('<div');
|
|
202
|
+
_$_.output_push(_$_.attr('class', `item-${i}`));
|
|
219
203
|
_$_.output_push('>');
|
|
220
204
|
|
|
221
205
|
{
|
|
222
|
-
_$_.output_push(
|
|
223
|
-
|
|
206
|
+
_$_.output_push('<span');
|
|
207
|
+
_$_.output_push(' class="value"');
|
|
208
|
+
_$_.output_push('>');
|
|
224
209
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
_$_.output_push('>');
|
|
210
|
+
{
|
|
211
|
+
_$_.output_push(_$_.escape(count));
|
|
212
|
+
}
|
|
229
213
|
|
|
230
|
-
|
|
231
|
-
_$_.output_push('
|
|
214
|
+
_$_.output_push('</span>');
|
|
215
|
+
_$_.output_push('<button');
|
|
216
|
+
_$_.output_push(' class="increment"');
|
|
217
|
+
_$_.output_push('>');
|
|
218
|
+
|
|
219
|
+
{
|
|
220
|
+
_$_.output_push('+');
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
_$_.output_push('</button>');
|
|
232
224
|
}
|
|
233
225
|
|
|
234
|
-
_$_.output_push('</
|
|
226
|
+
_$_.output_push('</div>');
|
|
227
|
+
i++;
|
|
235
228
|
}
|
|
236
229
|
|
|
237
|
-
_$_.output_push('
|
|
238
|
-
i++;
|
|
230
|
+
_$_.output_push('<!--]-->');
|
|
239
231
|
}
|
|
240
232
|
|
|
241
|
-
_$_.output_push('
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
_$_.output_push('</div>');
|
|
233
|
+
_$_.output_push('</div>');
|
|
234
|
+
});
|
|
245
235
|
});
|
|
246
|
-
|
|
247
|
-
_$_.pop_component();
|
|
248
236
|
}
|
|
249
237
|
|
|
250
238
|
export function NestedForLoop() {
|
|
251
|
-
_$_.
|
|
239
|
+
return _$_.tsrx_element(() => {
|
|
240
|
+
const grid = [[1, 2], [3, 4]];
|
|
252
241
|
|
|
253
|
-
|
|
242
|
+
_$_.regular_block(() => {
|
|
243
|
+
_$_.output_push('<div');
|
|
244
|
+
_$_.output_push(' class="grid"');
|
|
245
|
+
_$_.output_push('>');
|
|
254
246
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
_$_.output_push(' class="grid"');
|
|
258
|
-
_$_.output_push('>');
|
|
247
|
+
{
|
|
248
|
+
_$_.output_push('<!--[-->');
|
|
259
249
|
|
|
260
|
-
|
|
261
|
-
_$_.output_push('<!--[-->');
|
|
250
|
+
var rowIndex = 0;
|
|
262
251
|
|
|
263
|
-
|
|
252
|
+
for (const row of grid) {
|
|
253
|
+
_$_.output_push('<div');
|
|
254
|
+
_$_.output_push(_$_.attr('class', `row-${rowIndex}`));
|
|
255
|
+
_$_.output_push('>');
|
|
264
256
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
_$_.output_push(_$_.attr('class', `row-${rowIndex}`));
|
|
268
|
-
_$_.output_push('>');
|
|
257
|
+
{
|
|
258
|
+
_$_.output_push('<!--[-->');
|
|
269
259
|
|
|
270
|
-
|
|
271
|
-
_$_.output_push('<!--[-->');
|
|
260
|
+
var colIndex = 0;
|
|
272
261
|
|
|
273
|
-
|
|
262
|
+
for (const cell of row) {
|
|
263
|
+
_$_.output_push('<span');
|
|
264
|
+
_$_.output_push(_$_.attr('class', `cell-${rowIndex}-${colIndex}`));
|
|
265
|
+
_$_.output_push('>');
|
|
274
266
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
_$_.output_push('>');
|
|
267
|
+
{
|
|
268
|
+
_$_.output_push(_$_.escape(cell));
|
|
269
|
+
}
|
|
279
270
|
|
|
280
|
-
|
|
281
|
-
|
|
271
|
+
_$_.output_push('</span>');
|
|
272
|
+
colIndex++;
|
|
282
273
|
}
|
|
283
274
|
|
|
284
|
-
_$_.output_push('
|
|
285
|
-
colIndex++;
|
|
275
|
+
_$_.output_push('<!--]-->');
|
|
286
276
|
}
|
|
287
277
|
|
|
288
|
-
_$_.output_push('
|
|
278
|
+
_$_.output_push('</div>');
|
|
279
|
+
rowIndex++;
|
|
289
280
|
}
|
|
290
281
|
|
|
291
|
-
_$_.output_push('
|
|
292
|
-
rowIndex++;
|
|
282
|
+
_$_.output_push('<!--]-->');
|
|
293
283
|
}
|
|
294
284
|
|
|
295
|
-
_$_.output_push('
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
_$_.output_push('</div>');
|
|
285
|
+
_$_.output_push('</div>');
|
|
286
|
+
});
|
|
299
287
|
});
|
|
300
|
-
|
|
301
|
-
_$_.pop_component();
|
|
302
288
|
}
|
|
303
289
|
|
|
304
290
|
export function EmptyForLoop() {
|
|
305
|
-
_$_.
|
|
291
|
+
return _$_.tsrx_element(() => {
|
|
292
|
+
const items = [];
|
|
306
293
|
|
|
307
|
-
|
|
294
|
+
_$_.regular_block(() => {
|
|
295
|
+
_$_.output_push('<div');
|
|
296
|
+
_$_.output_push(' class="container"');
|
|
297
|
+
_$_.output_push('>');
|
|
308
298
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
_$_.output_push(' class="container"');
|
|
312
|
-
_$_.output_push('>');
|
|
299
|
+
{
|
|
300
|
+
_$_.output_push('<!--[-->');
|
|
313
301
|
|
|
314
|
-
|
|
315
|
-
|
|
302
|
+
for (const item of items) {
|
|
303
|
+
_$_.output_push('<span');
|
|
304
|
+
_$_.output_push('>');
|
|
316
305
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
306
|
+
{
|
|
307
|
+
_$_.output_push(_$_.escape(item));
|
|
308
|
+
}
|
|
320
309
|
|
|
321
|
-
|
|
322
|
-
_$_.output_push(_$_.escape(item));
|
|
310
|
+
_$_.output_push('</span>');
|
|
323
311
|
}
|
|
324
312
|
|
|
325
|
-
_$_.output_push('
|
|
313
|
+
_$_.output_push('<!--]-->');
|
|
326
314
|
}
|
|
327
315
|
|
|
328
|
-
_$_.output_push('
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
_$_.output_push('</div>');
|
|
316
|
+
_$_.output_push('</div>');
|
|
317
|
+
});
|
|
332
318
|
});
|
|
333
|
-
|
|
334
|
-
_$_.pop_component();
|
|
335
319
|
}
|
|
336
320
|
|
|
337
321
|
export function ForLoopComplexObjects() {
|
|
338
|
-
_$_.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
_$_.output_push('>');
|
|
348
|
-
|
|
349
|
-
{
|
|
350
|
-
_$_.output_push('<!--[-->');
|
|
322
|
+
return _$_.tsrx_element(() => {
|
|
323
|
+
const users = [
|
|
324
|
+
{ id: 1, name: 'Alice', role: 'Admin' },
|
|
325
|
+
{ id: 2, name: 'Bob', role: 'User' }
|
|
326
|
+
];
|
|
327
|
+
|
|
328
|
+
_$_.regular_block(() => {
|
|
329
|
+
_$_.output_push('<div');
|
|
330
|
+
_$_.output_push('>');
|
|
351
331
|
|
|
352
|
-
|
|
353
|
-
_$_.output_push('
|
|
354
|
-
_$_.output_push(_$_.attr('class', `user-${user.id}`));
|
|
355
|
-
_$_.output_push('>');
|
|
332
|
+
{
|
|
333
|
+
_$_.output_push('<!--[-->');
|
|
356
334
|
|
|
357
|
-
{
|
|
358
|
-
_$_.output_push('<
|
|
359
|
-
_$_.output_push('
|
|
335
|
+
for (const user of users) {
|
|
336
|
+
_$_.output_push('<div');
|
|
337
|
+
_$_.output_push(_$_.attr('class', `user-${user.id}`));
|
|
360
338
|
_$_.output_push('>');
|
|
361
339
|
|
|
362
340
|
{
|
|
363
|
-
_$_.output_push(
|
|
364
|
-
|
|
341
|
+
_$_.output_push('<span');
|
|
342
|
+
_$_.output_push(' class="name"');
|
|
343
|
+
_$_.output_push('>');
|
|
365
344
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
_$_.output_push('>');
|
|
345
|
+
{
|
|
346
|
+
_$_.output_push(_$_.escape(user.name));
|
|
347
|
+
}
|
|
370
348
|
|
|
371
|
-
|
|
372
|
-
_$_.output_push(
|
|
349
|
+
_$_.output_push('</span>');
|
|
350
|
+
_$_.output_push('<span');
|
|
351
|
+
_$_.output_push(' class="role"');
|
|
352
|
+
_$_.output_push('>');
|
|
353
|
+
|
|
354
|
+
{
|
|
355
|
+
_$_.output_push(_$_.escape(user.role));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
_$_.output_push('</span>');
|
|
373
359
|
}
|
|
374
360
|
|
|
375
|
-
_$_.output_push('</
|
|
361
|
+
_$_.output_push('</div>');
|
|
376
362
|
}
|
|
377
363
|
|
|
378
|
-
_$_.output_push('
|
|
364
|
+
_$_.output_push('<!--]-->');
|
|
379
365
|
}
|
|
380
366
|
|
|
381
|
-
_$_.output_push('
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
_$_.output_push('</div>');
|
|
367
|
+
_$_.output_push('</div>');
|
|
368
|
+
});
|
|
385
369
|
});
|
|
386
|
-
|
|
387
|
-
_$_.pop_component();
|
|
388
370
|
}
|
|
389
371
|
|
|
390
372
|
export function KeyedForLoopReorder() {
|
|
391
|
-
_$_.
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
373
|
+
return _$_.tsrx_element(() => {
|
|
374
|
+
let lazy_3 = _$_.track(
|
|
375
|
+
[
|
|
376
|
+
{ id: 1, name: 'First' },
|
|
377
|
+
{ id: 2, name: 'Second' },
|
|
378
|
+
{ id: 3, name: 'Third' }
|
|
379
|
+
],
|
|
380
|
+
'e7abc6a3'
|
|
381
|
+
);
|
|
382
|
+
|
|
383
|
+
_$_.regular_block(() => {
|
|
384
|
+
_$_.output_push('<button');
|
|
385
|
+
_$_.output_push(' class="reorder"');
|
|
386
|
+
_$_.output_push('>');
|
|
401
387
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
_$_.output_push('>');
|
|
388
|
+
{
|
|
389
|
+
_$_.output_push('Reorder');
|
|
390
|
+
}
|
|
406
391
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
}
|
|
392
|
+
_$_.output_push('</button>');
|
|
393
|
+
});
|
|
410
394
|
|
|
411
|
-
_$_.
|
|
412
|
-
|
|
395
|
+
_$_.regular_block(() => {
|
|
396
|
+
_$_.output_push('<ul');
|
|
397
|
+
_$_.output_push('>');
|
|
413
398
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
_$_.output_push('>');
|
|
399
|
+
{
|
|
400
|
+
_$_.output_push('<!--[-->');
|
|
417
401
|
|
|
418
|
-
|
|
419
|
-
|
|
402
|
+
for (const item of lazy_3.value) {
|
|
403
|
+
_$_.output_push('<li');
|
|
404
|
+
_$_.output_push(_$_.attr('class', `item-${item.id}`));
|
|
405
|
+
_$_.output_push('>');
|
|
420
406
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
_$_.output_push('>');
|
|
407
|
+
{
|
|
408
|
+
_$_.output_push(_$_.escape(item.name));
|
|
409
|
+
}
|
|
425
410
|
|
|
426
|
-
|
|
427
|
-
_$_.output_push(_$_.escape(item.name));
|
|
411
|
+
_$_.output_push('</li>');
|
|
428
412
|
}
|
|
429
413
|
|
|
430
|
-
_$_.output_push('
|
|
414
|
+
_$_.output_push('<!--]-->');
|
|
431
415
|
}
|
|
432
416
|
|
|
433
|
-
_$_.output_push('
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
_$_.output_push('</ul>');
|
|
417
|
+
_$_.output_push('</ul>');
|
|
418
|
+
});
|
|
437
419
|
});
|
|
438
|
-
|
|
439
|
-
_$_.pop_component();
|
|
440
420
|
}
|
|
441
421
|
|
|
442
422
|
export function KeyedForLoopUpdate() {
|
|
443
|
-
_$_.
|
|
423
|
+
return _$_.tsrx_element(() => {
|
|
424
|
+
let lazy_4 = _$_.track([{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }], '7a2c2ada');
|
|
444
425
|
|
|
445
|
-
|
|
426
|
+
_$_.regular_block(() => {
|
|
427
|
+
_$_.output_push('<button');
|
|
428
|
+
_$_.output_push(' class="update"');
|
|
429
|
+
_$_.output_push('>');
|
|
446
430
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
_$_.output_push('>');
|
|
431
|
+
{
|
|
432
|
+
_$_.output_push('Update');
|
|
433
|
+
}
|
|
451
434
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
435
|
+
_$_.output_push('</button>');
|
|
436
|
+
});
|
|
455
437
|
|
|
456
|
-
_$_.
|
|
457
|
-
|
|
438
|
+
_$_.regular_block(() => {
|
|
439
|
+
_$_.output_push('<ul');
|
|
440
|
+
_$_.output_push('>');
|
|
458
441
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
_$_.output_push('>');
|
|
442
|
+
{
|
|
443
|
+
_$_.output_push('<!--[-->');
|
|
462
444
|
|
|
463
|
-
|
|
464
|
-
|
|
445
|
+
for (const item of lazy_4.value) {
|
|
446
|
+
_$_.output_push('<li');
|
|
447
|
+
_$_.output_push(_$_.attr('class', `item-${item.id}`));
|
|
448
|
+
_$_.output_push('>');
|
|
465
449
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
_$_.output_push('>');
|
|
450
|
+
{
|
|
451
|
+
_$_.output_push(_$_.escape(item.name));
|
|
452
|
+
}
|
|
470
453
|
|
|
471
|
-
|
|
472
|
-
_$_.output_push(_$_.escape(item.name));
|
|
454
|
+
_$_.output_push('</li>');
|
|
473
455
|
}
|
|
474
456
|
|
|
475
|
-
_$_.output_push('
|
|
457
|
+
_$_.output_push('<!--]-->');
|
|
476
458
|
}
|
|
477
459
|
|
|
478
|
-
_$_.output_push('
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
_$_.output_push('</ul>');
|
|
460
|
+
_$_.output_push('</ul>');
|
|
461
|
+
});
|
|
482
462
|
});
|
|
483
|
-
|
|
484
|
-
_$_.pop_component();
|
|
485
463
|
}
|
|
486
464
|
|
|
487
465
|
export function ForLoopMixedOperations() {
|
|
488
|
-
_$_.
|
|
466
|
+
return _$_.tsrx_element(() => {
|
|
467
|
+
let lazy_5 = _$_.track(['A', 'B', 'C', 'D'], '3dd7c7b6');
|
|
489
468
|
|
|
490
|
-
|
|
469
|
+
_$_.regular_block(() => {
|
|
470
|
+
_$_.output_push('<button');
|
|
471
|
+
_$_.output_push(' class="shuffle"');
|
|
472
|
+
_$_.output_push('>');
|
|
491
473
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
_$_.output_push('>');
|
|
474
|
+
{
|
|
475
|
+
_$_.output_push('Shuffle');
|
|
476
|
+
}
|
|
496
477
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
}
|
|
478
|
+
_$_.output_push('</button>');
|
|
479
|
+
});
|
|
500
480
|
|
|
501
|
-
_$_.
|
|
502
|
-
|
|
481
|
+
_$_.regular_block(() => {
|
|
482
|
+
_$_.output_push('<ul');
|
|
483
|
+
_$_.output_push('>');
|
|
503
484
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
_$_.output_push('>');
|
|
485
|
+
{
|
|
486
|
+
_$_.output_push('<!--[-->');
|
|
507
487
|
|
|
508
|
-
|
|
509
|
-
|
|
488
|
+
for (const item of lazy_5.value) {
|
|
489
|
+
_$_.output_push('<li');
|
|
490
|
+
_$_.output_push(_$_.attr('class', `item-${item}`));
|
|
491
|
+
_$_.output_push('>');
|
|
510
492
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
_$_.output_push('>');
|
|
493
|
+
{
|
|
494
|
+
_$_.output_push(_$_.escape(item));
|
|
495
|
+
}
|
|
515
496
|
|
|
516
|
-
|
|
517
|
-
_$_.output_push(_$_.escape(item));
|
|
497
|
+
_$_.output_push('</li>');
|
|
518
498
|
}
|
|
519
499
|
|
|
520
|
-
_$_.output_push('
|
|
500
|
+
_$_.output_push('<!--]-->');
|
|
521
501
|
}
|
|
522
502
|
|
|
523
|
-
_$_.output_push('
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
_$_.output_push('</ul>');
|
|
503
|
+
_$_.output_push('</ul>');
|
|
504
|
+
});
|
|
527
505
|
});
|
|
528
|
-
|
|
529
|
-
_$_.pop_component();
|
|
530
506
|
}
|
|
531
507
|
|
|
532
508
|
export function ForLoopInsideIf() {
|
|
533
|
-
_$_.
|
|
509
|
+
return _$_.tsrx_element(() => {
|
|
510
|
+
let lazy_6 = _$_.track(true, '0528df30');
|
|
511
|
+
let lazy_7 = _$_.track(['X', 'Y', 'Z'], 'bf375103');
|
|
534
512
|
|
|
535
|
-
|
|
536
|
-
|
|
513
|
+
_$_.regular_block(() => {
|
|
514
|
+
_$_.output_push('<button');
|
|
515
|
+
_$_.output_push(' class="toggle"');
|
|
516
|
+
_$_.output_push('>');
|
|
537
517
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
_$_.output_push('>');
|
|
518
|
+
{
|
|
519
|
+
_$_.output_push('Toggle List');
|
|
520
|
+
}
|
|
542
521
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}
|
|
522
|
+
_$_.output_push('</button>');
|
|
523
|
+
});
|
|
546
524
|
|
|
547
|
-
_$_.
|
|
548
|
-
|
|
525
|
+
_$_.regular_block(() => {
|
|
526
|
+
_$_.output_push('<button');
|
|
527
|
+
_$_.output_push(' class="add"');
|
|
528
|
+
_$_.output_push('>');
|
|
549
529
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
_$_.output_push('>');
|
|
530
|
+
{
|
|
531
|
+
_$_.output_push('Add Item');
|
|
532
|
+
}
|
|
554
533
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}
|
|
534
|
+
_$_.output_push('</button>');
|
|
535
|
+
});
|
|
558
536
|
|
|
559
|
-
_$_.
|
|
560
|
-
|
|
537
|
+
_$_.regular_block(() => {
|
|
538
|
+
_$_.output_push('<!--[-->');
|
|
561
539
|
|
|
562
|
-
|
|
563
|
-
|
|
540
|
+
if (lazy_6.value) {
|
|
541
|
+
_$_.output_push('<ul');
|
|
542
|
+
_$_.output_push(' class="list"');
|
|
543
|
+
_$_.output_push('>');
|
|
564
544
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
_$_.output_push(' class="list"');
|
|
568
|
-
_$_.output_push('>');
|
|
545
|
+
{
|
|
546
|
+
_$_.output_push('<!--[-->');
|
|
569
547
|
|
|
570
|
-
|
|
571
|
-
|
|
548
|
+
for (const item of lazy_7.value) {
|
|
549
|
+
_$_.output_push('<li');
|
|
550
|
+
_$_.output_push('>');
|
|
572
551
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
552
|
+
{
|
|
553
|
+
_$_.output_push(_$_.escape(item));
|
|
554
|
+
}
|
|
576
555
|
|
|
577
|
-
|
|
578
|
-
_$_.output_push(_$_.escape(item));
|
|
556
|
+
_$_.output_push('</li>');
|
|
579
557
|
}
|
|
580
558
|
|
|
581
|
-
_$_.output_push('
|
|
559
|
+
_$_.output_push('<!--]-->');
|
|
582
560
|
}
|
|
583
561
|
|
|
584
|
-
_$_.output_push('
|
|
562
|
+
_$_.output_push('</ul>');
|
|
585
563
|
}
|
|
586
564
|
|
|
587
|
-
_$_.output_push('
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
_$_.output_push('<!--]-->');
|
|
565
|
+
_$_.output_push('<!--]-->');
|
|
566
|
+
});
|
|
591
567
|
});
|
|
592
|
-
|
|
593
|
-
_$_.pop_component();
|
|
594
568
|
}
|
|
595
569
|
|
|
596
570
|
export function ForLoopEmptyToPopulated() {
|
|
597
|
-
_$_.
|
|
571
|
+
return _$_.tsrx_element(() => {
|
|
572
|
+
let lazy_8 = _$_.track([], '525c5dbc');
|
|
598
573
|
|
|
599
|
-
|
|
574
|
+
_$_.regular_block(() => {
|
|
575
|
+
_$_.output_push('<button');
|
|
576
|
+
_$_.output_push(' class="populate"');
|
|
577
|
+
_$_.output_push('>');
|
|
600
578
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
_$_.output_push('>');
|
|
579
|
+
{
|
|
580
|
+
_$_.output_push('Populate');
|
|
581
|
+
}
|
|
605
582
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
}
|
|
583
|
+
_$_.output_push('</button>');
|
|
584
|
+
});
|
|
609
585
|
|
|
610
|
-
_$_.
|
|
611
|
-
|
|
586
|
+
_$_.regular_block(() => {
|
|
587
|
+
_$_.output_push('<ul');
|
|
588
|
+
_$_.output_push(' class="list"');
|
|
589
|
+
_$_.output_push('>');
|
|
612
590
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
_$_.output_push(' class="list"');
|
|
616
|
-
_$_.output_push('>');
|
|
591
|
+
{
|
|
592
|
+
_$_.output_push('<!--[-->');
|
|
617
593
|
|
|
618
|
-
|
|
619
|
-
|
|
594
|
+
for (const item of lazy_8.value) {
|
|
595
|
+
_$_.output_push('<li');
|
|
596
|
+
_$_.output_push('>');
|
|
620
597
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
598
|
+
{
|
|
599
|
+
_$_.output_push(_$_.escape(item));
|
|
600
|
+
}
|
|
624
601
|
|
|
625
|
-
|
|
626
|
-
_$_.output_push(_$_.escape(item));
|
|
602
|
+
_$_.output_push('</li>');
|
|
627
603
|
}
|
|
628
604
|
|
|
629
|
-
_$_.output_push('
|
|
605
|
+
_$_.output_push('<!--]-->');
|
|
630
606
|
}
|
|
631
607
|
|
|
632
|
-
_$_.output_push('
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
_$_.output_push('</ul>');
|
|
608
|
+
_$_.output_push('</ul>');
|
|
609
|
+
});
|
|
636
610
|
});
|
|
637
|
-
|
|
638
|
-
_$_.pop_component();
|
|
639
611
|
}
|
|
640
612
|
|
|
641
613
|
export function ForLoopPopulatedToEmpty() {
|
|
642
|
-
_$_.
|
|
614
|
+
return _$_.tsrx_element(() => {
|
|
615
|
+
let lazy_9 = _$_.track(['One', 'Two', 'Three'], 'ee47f078');
|
|
643
616
|
|
|
644
|
-
|
|
617
|
+
_$_.regular_block(() => {
|
|
618
|
+
_$_.output_push('<button');
|
|
619
|
+
_$_.output_push(' class="clear"');
|
|
620
|
+
_$_.output_push('>');
|
|
645
621
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
_$_.output_push('>');
|
|
622
|
+
{
|
|
623
|
+
_$_.output_push('Clear');
|
|
624
|
+
}
|
|
650
625
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}
|
|
626
|
+
_$_.output_push('</button>');
|
|
627
|
+
});
|
|
654
628
|
|
|
655
|
-
_$_.
|
|
656
|
-
|
|
629
|
+
_$_.regular_block(() => {
|
|
630
|
+
_$_.output_push('<ul');
|
|
631
|
+
_$_.output_push(' class="list"');
|
|
632
|
+
_$_.output_push('>');
|
|
657
633
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
_$_.output_push(' class="list"');
|
|
661
|
-
_$_.output_push('>');
|
|
634
|
+
{
|
|
635
|
+
_$_.output_push('<!--[-->');
|
|
662
636
|
|
|
663
|
-
|
|
664
|
-
|
|
637
|
+
for (const item of lazy_9.value) {
|
|
638
|
+
_$_.output_push('<li');
|
|
639
|
+
_$_.output_push('>');
|
|
665
640
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
641
|
+
{
|
|
642
|
+
_$_.output_push(_$_.escape(item));
|
|
643
|
+
}
|
|
669
644
|
|
|
670
|
-
|
|
671
|
-
_$_.output_push(_$_.escape(item));
|
|
645
|
+
_$_.output_push('</li>');
|
|
672
646
|
}
|
|
673
647
|
|
|
674
|
-
_$_.output_push('
|
|
648
|
+
_$_.output_push('<!--]-->');
|
|
675
649
|
}
|
|
676
650
|
|
|
677
|
-
_$_.output_push('
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
_$_.output_push('</ul>');
|
|
651
|
+
_$_.output_push('</ul>');
|
|
652
|
+
});
|
|
681
653
|
});
|
|
682
|
-
|
|
683
|
-
_$_.pop_component();
|
|
684
654
|
}
|
|
685
655
|
|
|
686
656
|
export function NestedForLoopReactive() {
|
|
687
|
-
_$_.
|
|
657
|
+
return _$_.tsrx_element(() => {
|
|
658
|
+
let lazy_10 = _$_.track([[1, 2], [3, 4]], 'a2f41fb3');
|
|
688
659
|
|
|
689
|
-
|
|
660
|
+
_$_.regular_block(() => {
|
|
661
|
+
_$_.output_push('<button');
|
|
662
|
+
_$_.output_push(' class="add-row"');
|
|
663
|
+
_$_.output_push('>');
|
|
690
664
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
_$_.output_push('>');
|
|
665
|
+
{
|
|
666
|
+
_$_.output_push('Add Row');
|
|
667
|
+
}
|
|
695
668
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
}
|
|
669
|
+
_$_.output_push('</button>');
|
|
670
|
+
});
|
|
699
671
|
|
|
700
|
-
_$_.
|
|
701
|
-
|
|
672
|
+
_$_.regular_block(() => {
|
|
673
|
+
_$_.output_push('<button');
|
|
674
|
+
_$_.output_push(' class="update-cell"');
|
|
675
|
+
_$_.output_push('>');
|
|
702
676
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
_$_.output_push('>');
|
|
677
|
+
{
|
|
678
|
+
_$_.output_push('Update Cell');
|
|
679
|
+
}
|
|
707
680
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}
|
|
681
|
+
_$_.output_push('</button>');
|
|
682
|
+
});
|
|
711
683
|
|
|
712
|
-
_$_.
|
|
713
|
-
|
|
684
|
+
_$_.regular_block(() => {
|
|
685
|
+
_$_.output_push('<div');
|
|
686
|
+
_$_.output_push(' class="grid"');
|
|
687
|
+
_$_.output_push('>');
|
|
714
688
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
_$_.output_push(' class="grid"');
|
|
718
|
-
_$_.output_push('>');
|
|
689
|
+
{
|
|
690
|
+
_$_.output_push('<!--[-->');
|
|
719
691
|
|
|
720
|
-
|
|
721
|
-
_$_.output_push('<!--[-->');
|
|
692
|
+
var rowIndex = 0;
|
|
722
693
|
|
|
723
|
-
|
|
694
|
+
for (const row of lazy_10.value) {
|
|
695
|
+
_$_.output_push('<div');
|
|
696
|
+
_$_.output_push(_$_.attr('class', `row-${rowIndex}`));
|
|
697
|
+
_$_.output_push('>');
|
|
724
698
|
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
_$_.output_push(_$_.attr('class', `row-${rowIndex}`));
|
|
728
|
-
_$_.output_push('>');
|
|
699
|
+
{
|
|
700
|
+
_$_.output_push('<!--[-->');
|
|
729
701
|
|
|
730
|
-
|
|
731
|
-
_$_.output_push('<!--[-->');
|
|
702
|
+
var colIndex = 0;
|
|
732
703
|
|
|
733
|
-
|
|
704
|
+
for (const cell of row) {
|
|
705
|
+
_$_.output_push('<span');
|
|
706
|
+
_$_.output_push(_$_.attr('class', `cell-${rowIndex}-${colIndex}`));
|
|
707
|
+
_$_.output_push('>');
|
|
734
708
|
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
_$_.output_push('>');
|
|
709
|
+
{
|
|
710
|
+
_$_.output_push(_$_.escape(cell));
|
|
711
|
+
}
|
|
739
712
|
|
|
740
|
-
|
|
741
|
-
|
|
713
|
+
_$_.output_push('</span>');
|
|
714
|
+
colIndex++;
|
|
742
715
|
}
|
|
743
716
|
|
|
744
|
-
_$_.output_push('
|
|
745
|
-
colIndex++;
|
|
717
|
+
_$_.output_push('<!--]-->');
|
|
746
718
|
}
|
|
747
719
|
|
|
748
|
-
_$_.output_push('
|
|
720
|
+
_$_.output_push('</div>');
|
|
721
|
+
rowIndex++;
|
|
749
722
|
}
|
|
750
723
|
|
|
751
|
-
_$_.output_push('
|
|
752
|
-
rowIndex++;
|
|
724
|
+
_$_.output_push('<!--]-->');
|
|
753
725
|
}
|
|
754
726
|
|
|
755
|
-
_$_.output_push('
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
_$_.output_push('</div>');
|
|
727
|
+
_$_.output_push('</div>');
|
|
728
|
+
});
|
|
759
729
|
});
|
|
760
|
-
|
|
761
|
-
_$_.pop_component();
|
|
762
730
|
}
|
|
763
731
|
|
|
764
732
|
export function ForLoopDeeplyNested() {
|
|
765
|
-
_$_.
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
},
|
|
776
|
-
|
|
777
|
-
{
|
|
778
|
-
id: 'd2',
|
|
779
|
-
name: 'Design',
|
|
780
|
-
teams: [{ id: 't3', name: 'UX', members: ['Diana', 'Eve', 'Frank'] }]
|
|
781
|
-
}
|
|
782
|
-
];
|
|
783
|
-
|
|
784
|
-
_$_.regular_block(() => {
|
|
785
|
-
_$_.output_push('<div');
|
|
786
|
-
_$_.output_push(' class="org"');
|
|
787
|
-
_$_.output_push('>');
|
|
788
|
-
|
|
789
|
-
{
|
|
790
|
-
_$_.output_push('<!--[-->');
|
|
733
|
+
return _$_.tsrx_element(() => {
|
|
734
|
+
const departments = [
|
|
735
|
+
{
|
|
736
|
+
id: 'd1',
|
|
737
|
+
name: 'Engineering',
|
|
738
|
+
teams: [
|
|
739
|
+
{ id: 't1', name: 'Frontend', members: ['Alice', 'Bob'] },
|
|
740
|
+
{ id: 't2', name: 'Backend', members: ['Charlie'] }
|
|
741
|
+
]
|
|
742
|
+
},
|
|
791
743
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
744
|
+
{
|
|
745
|
+
id: 'd2',
|
|
746
|
+
name: 'Design',
|
|
747
|
+
teams: [{ id: 't3', name: 'UX', members: ['Diana', 'Eve', 'Frank'] }]
|
|
748
|
+
}
|
|
749
|
+
];
|
|
796
750
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
751
|
+
_$_.regular_block(() => {
|
|
752
|
+
_$_.output_push('<div');
|
|
753
|
+
_$_.output_push(' class="org"');
|
|
754
|
+
_$_.output_push('>');
|
|
801
755
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
}
|
|
756
|
+
{
|
|
757
|
+
_$_.output_push('<!--[-->');
|
|
805
758
|
|
|
806
|
-
|
|
807
|
-
_$_.output_push('
|
|
759
|
+
for (const dept of departments) {
|
|
760
|
+
_$_.output_push('<div');
|
|
761
|
+
_$_.output_push(_$_.attr('class', `dept-${dept.id}`));
|
|
762
|
+
_$_.output_push('>');
|
|
808
763
|
|
|
809
|
-
|
|
810
|
-
_$_.output_push('<
|
|
811
|
-
_$_.output_push(
|
|
764
|
+
{
|
|
765
|
+
_$_.output_push('<h2');
|
|
766
|
+
_$_.output_push(' class="dept-name"');
|
|
812
767
|
_$_.output_push('>');
|
|
813
768
|
|
|
814
769
|
{
|
|
815
|
-
_$_.output_push(
|
|
816
|
-
|
|
817
|
-
_$_.output_push('>');
|
|
770
|
+
_$_.output_push(_$_.escape(dept.name));
|
|
771
|
+
}
|
|
818
772
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}
|
|
773
|
+
_$_.output_push('</h2>');
|
|
774
|
+
_$_.output_push('<!--[-->');
|
|
822
775
|
|
|
823
|
-
|
|
824
|
-
_$_.output_push('<
|
|
776
|
+
for (const team of dept.teams) {
|
|
777
|
+
_$_.output_push('<div');
|
|
778
|
+
_$_.output_push(_$_.attr('class', `team-${team.id}`));
|
|
825
779
|
_$_.output_push('>');
|
|
826
780
|
|
|
827
781
|
{
|
|
828
|
-
_$_.output_push('
|
|
782
|
+
_$_.output_push('<h3');
|
|
783
|
+
_$_.output_push(' class="team-name"');
|
|
784
|
+
_$_.output_push('>');
|
|
785
|
+
|
|
786
|
+
{
|
|
787
|
+
_$_.output_push(_$_.escape(team.name));
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
_$_.output_push('</h3>');
|
|
791
|
+
_$_.output_push('<ul');
|
|
792
|
+
_$_.output_push('>');
|
|
829
793
|
|
|
830
|
-
|
|
831
|
-
_$_.output_push('
|
|
832
|
-
_$_.output_push(' class="member"');
|
|
833
|
-
_$_.output_push('>');
|
|
794
|
+
{
|
|
795
|
+
_$_.output_push('<!--[-->');
|
|
834
796
|
|
|
835
|
-
{
|
|
836
|
-
_$_.output_push(
|
|
797
|
+
for (const member of team.members) {
|
|
798
|
+
_$_.output_push('<li');
|
|
799
|
+
_$_.output_push(' class="member"');
|
|
800
|
+
_$_.output_push('>');
|
|
801
|
+
|
|
802
|
+
{
|
|
803
|
+
_$_.output_push(_$_.escape(member));
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
_$_.output_push('</li>');
|
|
837
807
|
}
|
|
838
808
|
|
|
839
|
-
_$_.output_push('
|
|
809
|
+
_$_.output_push('<!--]-->');
|
|
840
810
|
}
|
|
841
811
|
|
|
842
|
-
_$_.output_push('
|
|
812
|
+
_$_.output_push('</ul>');
|
|
843
813
|
}
|
|
844
814
|
|
|
845
|
-
_$_.output_push('</
|
|
815
|
+
_$_.output_push('</div>');
|
|
846
816
|
}
|
|
847
817
|
|
|
848
|
-
_$_.output_push('
|
|
818
|
+
_$_.output_push('<!--]-->');
|
|
849
819
|
}
|
|
850
820
|
|
|
851
|
-
_$_.output_push('
|
|
821
|
+
_$_.output_push('</div>');
|
|
852
822
|
}
|
|
853
823
|
|
|
854
|
-
_$_.output_push('
|
|
824
|
+
_$_.output_push('<!--]-->');
|
|
855
825
|
}
|
|
856
826
|
|
|
857
|
-
_$_.output_push('
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
_$_.output_push('</div>');
|
|
827
|
+
_$_.output_push('</div>');
|
|
828
|
+
});
|
|
861
829
|
});
|
|
862
|
-
|
|
863
|
-
_$_.pop_component();
|
|
864
830
|
}
|
|
865
831
|
|
|
866
832
|
export function ForLoopIndexUpdate() {
|
|
867
|
-
_$_.
|
|
833
|
+
return _$_.tsrx_element(() => {
|
|
834
|
+
let lazy_11 = _$_.track(['First', 'Second', 'Third'], 'f61e31e6');
|
|
868
835
|
|
|
869
|
-
|
|
836
|
+
_$_.regular_block(() => {
|
|
837
|
+
_$_.output_push('<button');
|
|
838
|
+
_$_.output_push(' class="prepend"');
|
|
839
|
+
_$_.output_push('>');
|
|
870
840
|
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
_$_.output_push('>');
|
|
841
|
+
{
|
|
842
|
+
_$_.output_push('Prepend');
|
|
843
|
+
}
|
|
875
844
|
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
}
|
|
845
|
+
_$_.output_push('</button>');
|
|
846
|
+
});
|
|
879
847
|
|
|
880
|
-
_$_.
|
|
881
|
-
|
|
848
|
+
_$_.regular_block(() => {
|
|
849
|
+
_$_.output_push('<ul');
|
|
850
|
+
_$_.output_push('>');
|
|
882
851
|
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
_$_.output_push('>');
|
|
852
|
+
{
|
|
853
|
+
_$_.output_push('<!--[-->');
|
|
886
854
|
|
|
887
|
-
|
|
888
|
-
_$_.output_push('<!--[-->');
|
|
855
|
+
var i = 0;
|
|
889
856
|
|
|
890
|
-
|
|
857
|
+
for (const item of lazy_11.value) {
|
|
858
|
+
_$_.output_push('<li');
|
|
859
|
+
_$_.output_push(_$_.attr('class', `item-${i}`));
|
|
860
|
+
_$_.output_push('>');
|
|
891
861
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
_$_.output_push('>');
|
|
862
|
+
{
|
|
863
|
+
_$_.output_push(_$_.escape(`[${i}] ${item}`));
|
|
864
|
+
}
|
|
896
865
|
|
|
897
|
-
|
|
898
|
-
|
|
866
|
+
_$_.output_push('</li>');
|
|
867
|
+
i++;
|
|
899
868
|
}
|
|
900
869
|
|
|
901
|
-
_$_.output_push('
|
|
902
|
-
i++;
|
|
870
|
+
_$_.output_push('<!--]-->');
|
|
903
871
|
}
|
|
904
872
|
|
|
905
|
-
_$_.output_push('
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
_$_.output_push('</ul>');
|
|
873
|
+
_$_.output_push('</ul>');
|
|
874
|
+
});
|
|
909
875
|
});
|
|
910
|
-
|
|
911
|
-
_$_.pop_component();
|
|
912
876
|
}
|
|
913
877
|
|
|
914
878
|
export function KeyedForLoopWithIndex() {
|
|
915
|
-
_$_.
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
_$_.output_push('</button>');
|
|
936
|
-
});
|
|
879
|
+
return _$_.tsrx_element(() => {
|
|
880
|
+
let lazy_12 = _$_.track(
|
|
881
|
+
[
|
|
882
|
+
{ id: 'a', value: 'Alpha' },
|
|
883
|
+
{ id: 'b', value: 'Beta' },
|
|
884
|
+
{ id: 'c', value: 'Gamma' }
|
|
885
|
+
],
|
|
886
|
+
'3467975a'
|
|
887
|
+
);
|
|
888
|
+
|
|
889
|
+
_$_.regular_block(() => {
|
|
890
|
+
_$_.output_push('<button');
|
|
891
|
+
_$_.output_push(' class="reorder"');
|
|
892
|
+
_$_.output_push('>');
|
|
893
|
+
|
|
894
|
+
{
|
|
895
|
+
_$_.output_push('Rotate');
|
|
896
|
+
}
|
|
937
897
|
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
_$_.output_push('>');
|
|
898
|
+
_$_.output_push('</button>');
|
|
899
|
+
});
|
|
941
900
|
|
|
942
|
-
{
|
|
943
|
-
_$_.output_push('
|
|
901
|
+
_$_.regular_block(() => {
|
|
902
|
+
_$_.output_push('<ul');
|
|
903
|
+
_$_.output_push('>');
|
|
944
904
|
|
|
945
|
-
|
|
905
|
+
{
|
|
906
|
+
_$_.output_push('<!--[-->');
|
|
946
907
|
|
|
947
|
-
|
|
948
|
-
_$_.output_push('<li');
|
|
949
|
-
_$_.output_push(_$_.attr('data-index', i, false));
|
|
950
|
-
_$_.output_push(_$_.attr('class', `item-${item.id}`));
|
|
951
|
-
_$_.output_push('>');
|
|
908
|
+
var i = 0;
|
|
952
909
|
|
|
953
|
-
{
|
|
954
|
-
_$_.output_push(
|
|
910
|
+
for (const item of lazy_12.value) {
|
|
911
|
+
_$_.output_push('<li');
|
|
912
|
+
_$_.output_push(_$_.attr('data-index', i, false));
|
|
913
|
+
_$_.output_push(_$_.attr('class', `item-${item.id}`));
|
|
914
|
+
_$_.output_push('>');
|
|
915
|
+
|
|
916
|
+
{
|
|
917
|
+
_$_.output_push(_$_.escape(`[${i}] ${item.id}: ${item.value}`));
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
_$_.output_push('</li>');
|
|
921
|
+
i++;
|
|
955
922
|
}
|
|
956
923
|
|
|
957
|
-
_$_.output_push('
|
|
958
|
-
i++;
|
|
924
|
+
_$_.output_push('<!--]-->');
|
|
959
925
|
}
|
|
960
926
|
|
|
961
|
-
_$_.output_push('
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
_$_.output_push('</ul>');
|
|
927
|
+
_$_.output_push('</ul>');
|
|
928
|
+
});
|
|
965
929
|
});
|
|
966
|
-
|
|
967
|
-
_$_.pop_component();
|
|
968
930
|
}
|
|
969
931
|
|
|
970
932
|
export function ForLoopWithSiblings() {
|
|
971
|
-
_$_.
|
|
933
|
+
return _$_.tsrx_element(() => {
|
|
934
|
+
let lazy_13 = _$_.track(['A', 'B'], '3c7e8152');
|
|
972
935
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
_$_.output_push('<div');
|
|
977
|
-
_$_.output_push(' class="wrapper"');
|
|
978
|
-
_$_.output_push('>');
|
|
979
|
-
|
|
980
|
-
{
|
|
981
|
-
_$_.output_push('<header');
|
|
982
|
-
_$_.output_push(' class="before"');
|
|
936
|
+
_$_.regular_block(() => {
|
|
937
|
+
_$_.output_push('<div');
|
|
938
|
+
_$_.output_push(' class="wrapper"');
|
|
983
939
|
_$_.output_push('>');
|
|
984
940
|
|
|
985
941
|
{
|
|
986
|
-
_$_.output_push('
|
|
987
|
-
|
|
942
|
+
_$_.output_push('<header');
|
|
943
|
+
_$_.output_push(' class="before"');
|
|
944
|
+
_$_.output_push('>');
|
|
988
945
|
|
|
989
|
-
|
|
990
|
-
|
|
946
|
+
{
|
|
947
|
+
_$_.output_push('Before');
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
_$_.output_push('</header>');
|
|
951
|
+
_$_.output_push('<!--[-->');
|
|
952
|
+
|
|
953
|
+
for (const item of lazy_13.value) {
|
|
954
|
+
_$_.output_push('<div');
|
|
955
|
+
_$_.output_push(_$_.attr('class', `item-${item}`));
|
|
956
|
+
_$_.output_push('>');
|
|
957
|
+
|
|
958
|
+
{
|
|
959
|
+
_$_.output_push(_$_.escape(item));
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
_$_.output_push('</div>');
|
|
963
|
+
}
|
|
991
964
|
|
|
992
|
-
|
|
993
|
-
_$_.output_push('<
|
|
994
|
-
_$_.output_push(
|
|
965
|
+
_$_.output_push('<!--]-->');
|
|
966
|
+
_$_.output_push('<footer');
|
|
967
|
+
_$_.output_push(' class="after"');
|
|
995
968
|
_$_.output_push('>');
|
|
996
969
|
|
|
997
970
|
{
|
|
998
|
-
_$_.output_push(
|
|
971
|
+
_$_.output_push('After');
|
|
999
972
|
}
|
|
1000
973
|
|
|
1001
|
-
_$_.output_push('</
|
|
974
|
+
_$_.output_push('</footer>');
|
|
1002
975
|
}
|
|
1003
976
|
|
|
1004
|
-
_$_.output_push('
|
|
1005
|
-
|
|
1006
|
-
|
|
977
|
+
_$_.output_push('</div>');
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
_$_.regular_block(() => {
|
|
981
|
+
_$_.output_push('<button');
|
|
982
|
+
_$_.output_push(' class="add"');
|
|
1007
983
|
_$_.output_push('>');
|
|
1008
984
|
|
|
1009
985
|
{
|
|
1010
|
-
_$_.output_push('
|
|
986
|
+
_$_.output_push('Add');
|
|
1011
987
|
}
|
|
1012
988
|
|
|
1013
|
-
_$_.output_push('</
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
_$_.output_push('</div>');
|
|
1017
|
-
});
|
|
1018
|
-
|
|
1019
|
-
_$_.regular_block(() => {
|
|
1020
|
-
_$_.output_push('<button');
|
|
1021
|
-
_$_.output_push(' class="add"');
|
|
1022
|
-
_$_.output_push('>');
|
|
1023
|
-
|
|
1024
|
-
{
|
|
1025
|
-
_$_.output_push('Add');
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
_$_.output_push('</button>');
|
|
989
|
+
_$_.output_push('</button>');
|
|
990
|
+
});
|
|
1029
991
|
});
|
|
1030
|
-
|
|
1031
|
-
_$_.pop_component();
|
|
1032
992
|
}
|
|
1033
993
|
|
|
1034
994
|
export function ForLoopItemState() {
|
|
1035
|
-
_$_.
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
_$_.output_push('>');
|
|
995
|
+
return _$_.tsrx_element(() => {
|
|
996
|
+
const initialItems = [
|
|
997
|
+
{ id: 1, text: 'Todo 1' },
|
|
998
|
+
{ id: 2, text: 'Todo 2' },
|
|
999
|
+
{ id: 3, text: 'Todo 3' }
|
|
1000
|
+
];
|
|
1001
|
+
|
|
1002
|
+
_$_.regular_block(() => {
|
|
1003
|
+
_$_.output_push('<div');
|
|
1004
|
+
_$_.output_push('>');
|
|
1046
1005
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1006
|
+
{
|
|
1007
|
+
_$_.output_push('<!--[-->');
|
|
1049
1008
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1009
|
+
for (const item of initialItems) {
|
|
1010
|
+
{
|
|
1011
|
+
const comp = TodoItem;
|
|
1012
|
+
const args = [{ id: item.id, text: item.text }];
|
|
1054
1013
|
|
|
1055
|
-
|
|
1014
|
+
_$_.render_component(comp, ...args);
|
|
1015
|
+
}
|
|
1056
1016
|
}
|
|
1057
|
-
}
|
|
1058
1017
|
|
|
1059
|
-
|
|
1060
|
-
|
|
1018
|
+
_$_.output_push('<!--]-->');
|
|
1019
|
+
}
|
|
1061
1020
|
|
|
1062
|
-
|
|
1021
|
+
_$_.output_push('</div>');
|
|
1022
|
+
});
|
|
1063
1023
|
});
|
|
1064
|
-
|
|
1065
|
-
_$_.pop_component();
|
|
1066
1024
|
}
|
|
1067
1025
|
|
|
1068
1026
|
function TodoItem(props) {
|
|
1069
|
-
_$_.
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
_$_.output_push(_$_.attr('class', `todo-${props.id}`));
|
|
1076
|
-
_$_.output_push('>');
|
|
1077
|
-
|
|
1078
|
-
{
|
|
1079
|
-
_$_.output_push('<input');
|
|
1080
|
-
_$_.output_push(' type="checkbox"');
|
|
1081
|
-
_$_.output_push(_$_.attr('checked', lazy_14.value, true));
|
|
1082
|
-
_$_.output_push(' class="checkbox"');
|
|
1083
|
-
_$_.output_push(' />');
|
|
1084
|
-
_$_.output_push('<span');
|
|
1085
|
-
_$_.output_push(_$_.attr('class', lazy_14.value ? 'completed' : 'pending'));
|
|
1027
|
+
return _$_.tsrx_element(() => {
|
|
1028
|
+
let lazy_14 = _$_.track(false, '4f2402a4');
|
|
1029
|
+
|
|
1030
|
+
_$_.regular_block(() => {
|
|
1031
|
+
_$_.output_push('<div');
|
|
1032
|
+
_$_.output_push(_$_.attr('class', `todo-${props.id}`));
|
|
1086
1033
|
_$_.output_push('>');
|
|
1087
1034
|
|
|
1088
1035
|
{
|
|
1089
|
-
_$_.output_push(
|
|
1090
|
-
|
|
1036
|
+
_$_.output_push('<input');
|
|
1037
|
+
_$_.output_push(' type="checkbox"');
|
|
1038
|
+
_$_.output_push(_$_.attr('checked', lazy_14.value, true));
|
|
1039
|
+
_$_.output_push(' class="checkbox"');
|
|
1040
|
+
_$_.output_push(' />');
|
|
1041
|
+
_$_.output_push('<span');
|
|
1042
|
+
_$_.output_push(_$_.attr('class', lazy_14.value ? 'completed' : 'pending'));
|
|
1043
|
+
_$_.output_push('>');
|
|
1091
1044
|
|
|
1092
|
-
|
|
1093
|
-
|
|
1045
|
+
{
|
|
1046
|
+
_$_.output_push(_$_.escape(props.text));
|
|
1047
|
+
}
|
|
1094
1048
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1049
|
+
_$_.output_push('</span>');
|
|
1050
|
+
}
|
|
1097
1051
|
|
|
1098
|
-
|
|
1052
|
+
_$_.output_push('</div>');
|
|
1053
|
+
});
|
|
1054
|
+
});
|
|
1099
1055
|
}
|
|
1100
1056
|
|
|
1101
1057
|
export function ForLoopSingleItem() {
|
|
1102
|
-
_$_.
|
|
1058
|
+
return _$_.tsrx_element(() => {
|
|
1059
|
+
const items = ['Only'];
|
|
1103
1060
|
|
|
1104
|
-
|
|
1061
|
+
_$_.regular_block(() => {
|
|
1062
|
+
_$_.output_push('<ul');
|
|
1063
|
+
_$_.output_push('>');
|
|
1105
1064
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
_$_.output_push('>');
|
|
1065
|
+
{
|
|
1066
|
+
_$_.output_push('<!--[-->');
|
|
1109
1067
|
|
|
1110
|
-
|
|
1111
|
-
|
|
1068
|
+
for (const item of items) {
|
|
1069
|
+
_$_.output_push('<li');
|
|
1070
|
+
_$_.output_push(' class="single"');
|
|
1071
|
+
_$_.output_push('>');
|
|
1112
1072
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
_$_.output_push('>');
|
|
1073
|
+
{
|
|
1074
|
+
_$_.output_push(_$_.escape(item));
|
|
1075
|
+
}
|
|
1117
1076
|
|
|
1118
|
-
|
|
1119
|
-
_$_.output_push(_$_.escape(item));
|
|
1077
|
+
_$_.output_push('</li>');
|
|
1120
1078
|
}
|
|
1121
1079
|
|
|
1122
|
-
_$_.output_push('
|
|
1080
|
+
_$_.output_push('<!--]-->');
|
|
1123
1081
|
}
|
|
1124
1082
|
|
|
1125
|
-
_$_.output_push('
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
_$_.output_push('</ul>');
|
|
1083
|
+
_$_.output_push('</ul>');
|
|
1084
|
+
});
|
|
1129
1085
|
});
|
|
1130
|
-
|
|
1131
|
-
_$_.pop_component();
|
|
1132
1086
|
}
|
|
1133
1087
|
|
|
1134
1088
|
export function ForLoopAddAtBeginning() {
|
|
1135
|
-
_$_.
|
|
1089
|
+
return _$_.tsrx_element(() => {
|
|
1090
|
+
let lazy_15 = _$_.track(['B', 'C'], '1561403a');
|
|
1136
1091
|
|
|
1137
|
-
|
|
1092
|
+
_$_.regular_block(() => {
|
|
1093
|
+
_$_.output_push('<button');
|
|
1094
|
+
_$_.output_push(' class="prepend"');
|
|
1095
|
+
_$_.output_push('>');
|
|
1138
1096
|
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
_$_.output_push('>');
|
|
1097
|
+
{
|
|
1098
|
+
_$_.output_push('Prepend A');
|
|
1099
|
+
}
|
|
1143
1100
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}
|
|
1101
|
+
_$_.output_push('</button>');
|
|
1102
|
+
});
|
|
1147
1103
|
|
|
1148
|
-
_$_.
|
|
1149
|
-
|
|
1104
|
+
_$_.regular_block(() => {
|
|
1105
|
+
_$_.output_push('<ul');
|
|
1106
|
+
_$_.output_push('>');
|
|
1150
1107
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
_$_.output_push('>');
|
|
1108
|
+
{
|
|
1109
|
+
_$_.output_push('<!--[-->');
|
|
1154
1110
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1111
|
+
for (const item of lazy_15.value) {
|
|
1112
|
+
_$_.output_push('<li');
|
|
1113
|
+
_$_.output_push(_$_.attr('class', `item-${item}`));
|
|
1114
|
+
_$_.output_push('>');
|
|
1157
1115
|
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
_$_.output_push('>');
|
|
1116
|
+
{
|
|
1117
|
+
_$_.output_push(_$_.escape(item));
|
|
1118
|
+
}
|
|
1162
1119
|
|
|
1163
|
-
|
|
1164
|
-
_$_.output_push(_$_.escape(item));
|
|
1120
|
+
_$_.output_push('</li>');
|
|
1165
1121
|
}
|
|
1166
1122
|
|
|
1167
|
-
_$_.output_push('
|
|
1123
|
+
_$_.output_push('<!--]-->');
|
|
1168
1124
|
}
|
|
1169
1125
|
|
|
1170
|
-
_$_.output_push('
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
_$_.output_push('</ul>');
|
|
1126
|
+
_$_.output_push('</ul>');
|
|
1127
|
+
});
|
|
1174
1128
|
});
|
|
1175
|
-
|
|
1176
|
-
_$_.pop_component();
|
|
1177
1129
|
}
|
|
1178
1130
|
|
|
1179
1131
|
export function ForLoopAddInMiddle() {
|
|
1180
|
-
_$_.
|
|
1132
|
+
return _$_.tsrx_element(() => {
|
|
1133
|
+
let lazy_16 = _$_.track(['A', 'C'], '1bc60b46');
|
|
1181
1134
|
|
|
1182
|
-
|
|
1135
|
+
_$_.regular_block(() => {
|
|
1136
|
+
_$_.output_push('<button');
|
|
1137
|
+
_$_.output_push(' class="insert"');
|
|
1138
|
+
_$_.output_push('>');
|
|
1183
1139
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
_$_.output_push('>');
|
|
1140
|
+
{
|
|
1141
|
+
_$_.output_push('Insert B');
|
|
1142
|
+
}
|
|
1188
1143
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
}
|
|
1144
|
+
_$_.output_push('</button>');
|
|
1145
|
+
});
|
|
1192
1146
|
|
|
1193
|
-
_$_.
|
|
1194
|
-
|
|
1147
|
+
_$_.regular_block(() => {
|
|
1148
|
+
_$_.output_push('<ul');
|
|
1149
|
+
_$_.output_push('>');
|
|
1195
1150
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
_$_.output_push('>');
|
|
1151
|
+
{
|
|
1152
|
+
_$_.output_push('<!--[-->');
|
|
1199
1153
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1154
|
+
for (const item of lazy_16.value) {
|
|
1155
|
+
_$_.output_push('<li');
|
|
1156
|
+
_$_.output_push(_$_.attr('class', `item-${item}`));
|
|
1157
|
+
_$_.output_push('>');
|
|
1202
1158
|
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
_$_.output_push('>');
|
|
1159
|
+
{
|
|
1160
|
+
_$_.output_push(_$_.escape(item));
|
|
1161
|
+
}
|
|
1207
1162
|
|
|
1208
|
-
|
|
1209
|
-
_$_.output_push(_$_.escape(item));
|
|
1163
|
+
_$_.output_push('</li>');
|
|
1210
1164
|
}
|
|
1211
1165
|
|
|
1212
|
-
_$_.output_push('
|
|
1166
|
+
_$_.output_push('<!--]-->');
|
|
1213
1167
|
}
|
|
1214
1168
|
|
|
1215
|
-
_$_.output_push('
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
_$_.output_push('</ul>');
|
|
1169
|
+
_$_.output_push('</ul>');
|
|
1170
|
+
});
|
|
1219
1171
|
});
|
|
1220
|
-
|
|
1221
|
-
_$_.pop_component();
|
|
1222
1172
|
}
|
|
1223
1173
|
|
|
1224
1174
|
export function ForLoopRemoveFromMiddle() {
|
|
1225
|
-
_$_.
|
|
1175
|
+
return _$_.tsrx_element(() => {
|
|
1176
|
+
let lazy_17 = _$_.track(['A', 'B', 'C'], '1c87f95f');
|
|
1226
1177
|
|
|
1227
|
-
|
|
1178
|
+
_$_.regular_block(() => {
|
|
1179
|
+
_$_.output_push('<button');
|
|
1180
|
+
_$_.output_push(' class="remove-middle"');
|
|
1181
|
+
_$_.output_push('>');
|
|
1228
1182
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
_$_.output_push('>');
|
|
1183
|
+
{
|
|
1184
|
+
_$_.output_push('Remove B');
|
|
1185
|
+
}
|
|
1233
1186
|
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
}
|
|
1187
|
+
_$_.output_push('</button>');
|
|
1188
|
+
});
|
|
1237
1189
|
|
|
1238
|
-
_$_.
|
|
1239
|
-
|
|
1190
|
+
_$_.regular_block(() => {
|
|
1191
|
+
_$_.output_push('<ul');
|
|
1192
|
+
_$_.output_push('>');
|
|
1240
1193
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
_$_.output_push('>');
|
|
1194
|
+
{
|
|
1195
|
+
_$_.output_push('<!--[-->');
|
|
1244
1196
|
|
|
1245
|
-
|
|
1246
|
-
|
|
1197
|
+
for (const item of lazy_17.value) {
|
|
1198
|
+
_$_.output_push('<li');
|
|
1199
|
+
_$_.output_push(_$_.attr('class', `item-${item}`));
|
|
1200
|
+
_$_.output_push('>');
|
|
1247
1201
|
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
_$_.output_push('>');
|
|
1202
|
+
{
|
|
1203
|
+
_$_.output_push(_$_.escape(item));
|
|
1204
|
+
}
|
|
1252
1205
|
|
|
1253
|
-
|
|
1254
|
-
_$_.output_push(_$_.escape(item));
|
|
1206
|
+
_$_.output_push('</li>');
|
|
1255
1207
|
}
|
|
1256
1208
|
|
|
1257
|
-
_$_.output_push('
|
|
1209
|
+
_$_.output_push('<!--]-->');
|
|
1258
1210
|
}
|
|
1259
1211
|
|
|
1260
|
-
_$_.output_push('
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
_$_.output_push('</ul>');
|
|
1212
|
+
_$_.output_push('</ul>');
|
|
1213
|
+
});
|
|
1264
1214
|
});
|
|
1265
|
-
|
|
1266
|
-
_$_.pop_component();
|
|
1267
1215
|
}
|
|
1268
1216
|
|
|
1269
1217
|
export function ForLoopLargeList() {
|
|
1270
|
-
_$_.
|
|
1218
|
+
return _$_.tsrx_element(() => {
|
|
1219
|
+
const items = Array.from({ length: 50 }, (_, i) => `Item ${i + 1}`);
|
|
1271
1220
|
|
|
1272
|
-
|
|
1221
|
+
_$_.regular_block(() => {
|
|
1222
|
+
_$_.output_push('<ul');
|
|
1223
|
+
_$_.output_push(' class="large-list"');
|
|
1224
|
+
_$_.output_push('>');
|
|
1273
1225
|
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
_$_.output_push(' class="large-list"');
|
|
1277
|
-
_$_.output_push('>');
|
|
1226
|
+
{
|
|
1227
|
+
_$_.output_push('<!--[-->');
|
|
1278
1228
|
|
|
1279
|
-
|
|
1280
|
-
_$_.output_push('<!--[-->');
|
|
1229
|
+
var i = 0;
|
|
1281
1230
|
|
|
1282
|
-
|
|
1231
|
+
for (const item of items) {
|
|
1232
|
+
_$_.output_push('<li');
|
|
1233
|
+
_$_.output_push(_$_.attr('class', `item-${i}`));
|
|
1234
|
+
_$_.output_push('>');
|
|
1283
1235
|
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
_$_.output_push('>');
|
|
1236
|
+
{
|
|
1237
|
+
_$_.output_push(_$_.escape(item));
|
|
1238
|
+
}
|
|
1288
1239
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1240
|
+
_$_.output_push('</li>');
|
|
1241
|
+
i++;
|
|
1291
1242
|
}
|
|
1292
1243
|
|
|
1293
|
-
_$_.output_push('
|
|
1294
|
-
i++;
|
|
1244
|
+
_$_.output_push('<!--]-->');
|
|
1295
1245
|
}
|
|
1296
1246
|
|
|
1297
|
-
_$_.output_push('
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
_$_.output_push('</ul>');
|
|
1247
|
+
_$_.output_push('</ul>');
|
|
1248
|
+
});
|
|
1301
1249
|
});
|
|
1302
|
-
|
|
1303
|
-
_$_.pop_component();
|
|
1304
1250
|
}
|
|
1305
1251
|
|
|
1306
1252
|
export function ForLoopSwap() {
|
|
1307
|
-
_$_.
|
|
1253
|
+
return _$_.tsrx_element(() => {
|
|
1254
|
+
let lazy_18 = _$_.track(['A', 'B', 'C', 'D'], '5f8d152f');
|
|
1308
1255
|
|
|
1309
|
-
|
|
1256
|
+
_$_.regular_block(() => {
|
|
1257
|
+
_$_.output_push('<button');
|
|
1258
|
+
_$_.output_push(' class="swap"');
|
|
1259
|
+
_$_.output_push('>');
|
|
1310
1260
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
_$_.output_push('>');
|
|
1261
|
+
{
|
|
1262
|
+
_$_.output_push('Swap First and Last');
|
|
1263
|
+
}
|
|
1315
1264
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
}
|
|
1265
|
+
_$_.output_push('</button>');
|
|
1266
|
+
});
|
|
1319
1267
|
|
|
1320
|
-
_$_.
|
|
1321
|
-
|
|
1268
|
+
_$_.regular_block(() => {
|
|
1269
|
+
_$_.output_push('<ul');
|
|
1270
|
+
_$_.output_push('>');
|
|
1322
1271
|
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
_$_.output_push('>');
|
|
1272
|
+
{
|
|
1273
|
+
_$_.output_push('<!--[-->');
|
|
1326
1274
|
|
|
1327
|
-
|
|
1328
|
-
|
|
1275
|
+
for (const item of lazy_18.value) {
|
|
1276
|
+
_$_.output_push('<li');
|
|
1277
|
+
_$_.output_push(_$_.attr('class', `item-${item}`));
|
|
1278
|
+
_$_.output_push('>');
|
|
1329
1279
|
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
_$_.output_push('>');
|
|
1280
|
+
{
|
|
1281
|
+
_$_.output_push(_$_.escape(item));
|
|
1282
|
+
}
|
|
1334
1283
|
|
|
1335
|
-
|
|
1336
|
-
_$_.output_push(_$_.escape(item));
|
|
1284
|
+
_$_.output_push('</li>');
|
|
1337
1285
|
}
|
|
1338
1286
|
|
|
1339
|
-
_$_.output_push('
|
|
1287
|
+
_$_.output_push('<!--]-->');
|
|
1340
1288
|
}
|
|
1341
1289
|
|
|
1342
|
-
_$_.output_push('
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
_$_.output_push('</ul>');
|
|
1290
|
+
_$_.output_push('</ul>');
|
|
1291
|
+
});
|
|
1346
1292
|
});
|
|
1347
|
-
|
|
1348
|
-
_$_.pop_component();
|
|
1349
1293
|
}
|
|
1350
1294
|
|
|
1351
1295
|
export function ForLoopReverse() {
|
|
1352
|
-
_$_.
|
|
1296
|
+
return _$_.tsrx_element(() => {
|
|
1297
|
+
let lazy_19 = _$_.track(['A', 'B', 'C', 'D'], '24602e64');
|
|
1353
1298
|
|
|
1354
|
-
|
|
1299
|
+
_$_.regular_block(() => {
|
|
1300
|
+
_$_.output_push('<button');
|
|
1301
|
+
_$_.output_push(' class="reverse"');
|
|
1302
|
+
_$_.output_push('>');
|
|
1355
1303
|
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
_$_.output_push('>');
|
|
1304
|
+
{
|
|
1305
|
+
_$_.output_push('Reverse');
|
|
1306
|
+
}
|
|
1360
1307
|
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
}
|
|
1308
|
+
_$_.output_push('</button>');
|
|
1309
|
+
});
|
|
1364
1310
|
|
|
1365
|
-
_$_.
|
|
1366
|
-
|
|
1311
|
+
_$_.regular_block(() => {
|
|
1312
|
+
_$_.output_push('<ul');
|
|
1313
|
+
_$_.output_push('>');
|
|
1367
1314
|
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
_$_.output_push('>');
|
|
1315
|
+
{
|
|
1316
|
+
_$_.output_push('<!--[-->');
|
|
1371
1317
|
|
|
1372
|
-
|
|
1373
|
-
|
|
1318
|
+
for (const item of lazy_19.value) {
|
|
1319
|
+
_$_.output_push('<li');
|
|
1320
|
+
_$_.output_push(_$_.attr('class', `item-${item}`));
|
|
1321
|
+
_$_.output_push('>');
|
|
1374
1322
|
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
_$_.output_push('>');
|
|
1323
|
+
{
|
|
1324
|
+
_$_.output_push(_$_.escape(item));
|
|
1325
|
+
}
|
|
1379
1326
|
|
|
1380
|
-
|
|
1381
|
-
_$_.output_push(_$_.escape(item));
|
|
1327
|
+
_$_.output_push('</li>');
|
|
1382
1328
|
}
|
|
1383
1329
|
|
|
1384
|
-
_$_.output_push('
|
|
1330
|
+
_$_.output_push('<!--]-->');
|
|
1385
1331
|
}
|
|
1386
1332
|
|
|
1387
|
-
_$_.output_push('
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
_$_.output_push('</ul>');
|
|
1333
|
+
_$_.output_push('</ul>');
|
|
1334
|
+
});
|
|
1391
1335
|
});
|
|
1392
|
-
|
|
1393
|
-
_$_.pop_component();
|
|
1394
1336
|
}
|