Skip to content

Commit

Permalink
🚠
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Oct 26, 2024
1 parent 91fe075 commit be584a0
Show file tree
Hide file tree
Showing 22 changed files with 2,299 additions and 72 deletions.
64 changes: 64 additions & 0 deletions packages/core/src/__tests__/__snapshots__/alpine.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,38 @@ exports[`Alpine.js > jsx > Javascript Test > Advanced 1`] = `
>
<p><span x-html=\\"index\\"></span></p>
</template>
<template x-for=\\"person in names\\">
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
<template
x-for=\\"person in Array.from({
length: 10
})\\"
>
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
<template x-for=\\"person in names\\">
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
<template
x-for=\\"person in Array.from({
length: 10
})\\"
>
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
</main>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Expand Down Expand Up @@ -2893,6 +2925,38 @@ exports[`Alpine.js > jsx > Typescript Test > Advanced 1`] = `
>
<p><span x-html=\\"index\\"></span></p>
</template>
<template x-for=\\"person in names\\">
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
<template
x-for=\\"person in Array.from({
length: 10
})\\"
>
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
<template x-for=\\"person in names\\">
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
<template
x-for=\\"person in Array.from({
length: 10
})\\"
>
<span>
<span x-html=\\"person\\"></span>
<span x-html=\\"index\\"></span>
</span>
</template>
</main>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ import { Component } from \\"@angular/core\\";
>
<p>{{index}}</p>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
</main>
\`,
styles: [
Expand Down Expand Up @@ -878,7 +898,7 @@ import { Component, Input } from \\"@angular/core\\";
selector: \\"column\\",
template: \`
<div class=\\"builder-columns div\\">
<ng-container *ngFor=\\"let column of columns\\">
<ng-container *ngFor=\\"let column of columns; index as index\\">
<div class=\\"builder-column div-2\\">{{column.content}} {{index}}</div>
</ng-container>
</div>
Expand Down Expand Up @@ -1306,7 +1326,7 @@ import {
>
<ng-container *ngIf=\\"builderBlock && builderBlock.children\\">
<ng-container
*ngFor=\\"let block of builderBlock?.children; trackBy: trackByBlock0\\"
*ngFor=\\"let block of builderBlock?.children; index as index; trackBy: trackByBlock0\\"
>
<builder-block-component
[block]=\\"block\\"
Expand Down Expand Up @@ -2319,7 +2339,7 @@ import { Builder } from \\"@builder.io/sdk\\";
[attr.name]=\\"name\\"
#elRef0
>
<ng-container *ngFor=\\"let option of options\\">
<ng-container *ngFor=\\"let option of options; index as index\\">
<option [attr.value]=\\"option.value\\" [attr.data-index]=\\"index\\">
{{option.name || option.value}}
</option>
Expand Down Expand Up @@ -2570,7 +2590,9 @@ import { kebabCase, snakeCase } from \\"lodash\\";
Submit
</button>
</ng-container>
<ng-container *ngFor=\\"let review of reviews; trackBy: trackByReview0\\">
<ng-container
*ngFor=\\"let review of reviews; index as index; trackBy: trackByReview0\\"
>
<div class=\\"review\\">
<img class=\\"img\\" [attr.src]=\\"review.avatar\\" />
<div [class]=\\"showReviewPrompt ? 'bg-primary' : 'bg-secondary'\\">
Expand Down Expand Up @@ -5210,7 +5232,7 @@ import RenderRepeatedBlock from \\"./render-repeated-block.lite\\";
</ng-container>
<ng-container *ngIf=\\"!isEmptyHtmlElement(tag) && repeatItemData\\">
<ng-container
*ngFor=\\"let data of repeatItemData; trackBy: trackByData0\\"
*ngFor=\\"let data of repeatItemData; index as index; trackBy: trackByData0\\"
>
<render-repeated-block
[repeatContext]=\\"data.context\\"
Expand Down Expand Up @@ -7046,6 +7068,26 @@ import { Component } from \\"@angular/core\\";
>
<p>{{index}}</p>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
</main>
\`,
styles: [
Expand Down Expand Up @@ -7952,7 +7994,7 @@ export interface ColumnProps {
selector: \\"column\\",
template: \`
<div class=\\"builder-columns div\\">
<ng-container *ngFor=\\"let column of columns\\">
<ng-container *ngFor=\\"let column of columns; index as index\\">
<div class=\\"builder-column div-2\\">{{column.content}} {{index}}</div>
</ng-container>
</div>
Expand Down Expand Up @@ -8428,7 +8470,7 @@ import {
>
<ng-container *ngIf=\\"builderBlock && builderBlock.children\\">
<ng-container
*ngFor=\\"let block of builderBlock?.children; trackBy: trackByBlock0\\"
*ngFor=\\"let block of builderBlock?.children; index as index; trackBy: trackByBlock0\\"
>
<builder-block-component
[block]=\\"block\\"
Expand Down Expand Up @@ -9528,7 +9570,7 @@ import { Builder } from \\"@builder.io/sdk\\";
[attr.name]=\\"name\\"
#elRef0
>
<ng-container *ngFor=\\"let option of options\\">
<ng-container *ngFor=\\"let option of options; index as index\\">
<option [attr.value]=\\"option.value\\" [attr.data-index]=\\"index\\">
{{option.name || option.value}}
</option>
Expand Down Expand Up @@ -9800,7 +9842,9 @@ import { kebabCase, snakeCase } from \\"lodash\\";
Submit
</button>
</ng-container>
<ng-container *ngFor=\\"let review of reviews; trackBy: trackByReview0\\">
<ng-container
*ngFor=\\"let review of reviews; index as index; trackBy: trackByReview0\\"
>
<div class=\\"review\\">
<img class=\\"img\\" [attr.src]=\\"review.avatar\\" />
<div [class]=\\"showReviewPrompt ? 'bg-primary' : 'bg-secondary'\\">
Expand Down Expand Up @@ -12624,7 +12668,7 @@ import type { RepeatData } from \\"./types.js\\";
</ng-container>
<ng-container *ngIf=\\"!isEmptyHtmlElement(tag) && repeatItemData\\">
<ng-container
*ngFor=\\"let data of repeatItemData; trackBy: trackByData0\\"
*ngFor=\\"let data of repeatItemData; index as index; trackBy: trackByData0\\"
>
<render-repeated-block
[repeatContext]=\\"data.context\\"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ import { Component } from \\"@angular/core\\";
>
<p>{{index}}</p>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
</main>
\`,
styles: [
Expand Down Expand Up @@ -894,7 +914,7 @@ import { Component, Input } from \\"@angular/core\\";
selector: \\"column\\",
template: \`
<div class=\\"builder-columns div\\">
<ng-container *ngFor=\\"let column of columns\\">
<ng-container *ngFor=\\"let column of columns; index as index\\">
<div class=\\"builder-column div-2\\">{{column.content}} {{index}}</div>
</ng-container>
</div>
Expand Down Expand Up @@ -1327,7 +1347,7 @@ import {
>
<ng-container *ngIf=\\"builderBlock && builderBlock.children\\">
<ng-container
*ngFor=\\"let block of builderBlock?.children; trackBy: trackByBlock0\\"
*ngFor=\\"let block of builderBlock?.children; index as index; trackBy: trackByBlock0\\"
>
<builder-block-component
[block]=\\"block\\"
Expand Down Expand Up @@ -2349,7 +2369,7 @@ import { Builder } from \\"@builder.io/sdk\\";
[attr.name]=\\"name\\"
#elRef0
>
<ng-container *ngFor=\\"let option of options\\">
<ng-container *ngFor=\\"let option of options; index as index\\">
<option [attr.value]=\\"option.value\\" [attr.data-index]=\\"index\\">
{{option.name || option.value}}
</option>
Expand Down Expand Up @@ -2605,7 +2625,9 @@ import { kebabCase, snakeCase } from \\"lodash\\";
Submit
</button>
</ng-container>
<ng-container *ngFor=\\"let review of reviews; trackBy: trackByReview0\\">
<ng-container
*ngFor=\\"let review of reviews; index as index; trackBy: trackByReview0\\"
>
<div class=\\"review\\">
<img class=\\"img\\" [attr.src]=\\"review.avatar\\" />
<div [class]=\\"showReviewPrompt ? 'bg-primary' : 'bg-secondary'\\">
Expand Down Expand Up @@ -5295,7 +5317,7 @@ import RenderRepeatedBlockModule from \\"./render-repeated-block.lite/angular\\"
</ng-container>
<ng-container *ngIf=\\"!isEmptyHtmlElement(tag) && repeatItemData\\">
<ng-container
*ngFor=\\"let data of repeatItemData; trackBy: trackByData0\\"
*ngFor=\\"let data of repeatItemData; index as index; trackBy: trackByData0\\"
>
<render-repeated-block
[repeatContext]=\\"data.context\\"
Expand Down Expand Up @@ -7163,6 +7185,26 @@ import { Component } from \\"@angular/core\\";
>
<p>{{index}}</p>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container *ngFor=\\"let person of names; index as index\\">
<span>{{person}} {{index}}</span>
</ng-container>
<ng-container
*ngFor=\\"let person of Array.from({
length: 10
}); index as index\\"
>
<span>{{person}} {{index}}</span>
</ng-container>
</main>
\`,
styles: [
Expand Down Expand Up @@ -8085,7 +8127,7 @@ export interface ColumnProps {
selector: \\"column\\",
template: \`
<div class=\\"builder-columns div\\">
<ng-container *ngFor=\\"let column of columns\\">
<ng-container *ngFor=\\"let column of columns; index as index\\">
<div class=\\"builder-column div-2\\">{{column.content}} {{index}}</div>
</ng-container>
</div>
Expand Down Expand Up @@ -8566,7 +8608,7 @@ import {
>
<ng-container *ngIf=\\"builderBlock && builderBlock.children\\">
<ng-container
*ngFor=\\"let block of builderBlock?.children; trackBy: trackByBlock0\\"
*ngFor=\\"let block of builderBlock?.children; index as index; trackBy: trackByBlock0\\"
>
<builder-block-component
[block]=\\"block\\"
Expand Down Expand Up @@ -9675,7 +9717,7 @@ import { Builder } from \\"@builder.io/sdk\\";
[attr.name]=\\"name\\"
#elRef0
>
<ng-container *ngFor=\\"let option of options\\">
<ng-container *ngFor=\\"let option of options; index as index\\">
<option [attr.value]=\\"option.value\\" [attr.data-index]=\\"index\\">
{{option.name || option.value}}
</option>
Expand Down Expand Up @@ -9952,7 +9994,9 @@ import { kebabCase, snakeCase } from \\"lodash\\";
Submit
</button>
</ng-container>
<ng-container *ngFor=\\"let review of reviews; trackBy: trackByReview0\\">
<ng-container
*ngFor=\\"let review of reviews; index as index; trackBy: trackByReview0\\"
>
<div class=\\"review\\">
<img class=\\"img\\" [attr.src]=\\"review.avatar\\" />
<div [class]=\\"showReviewPrompt ? 'bg-primary' : 'bg-secondary'\\">
Expand Down Expand Up @@ -12828,7 +12872,7 @@ import { RepeatData } from \\"./types.js\\";
</ng-container>
<ng-container *ngIf=\\"!isEmptyHtmlElement(tag) && repeatItemData\\">
<ng-container
*ngFor=\\"let data of repeatItemData; trackBy: trackByData0\\"
*ngFor=\\"let data of repeatItemData; index as index; trackBy: trackByData0\\"
>
<render-repeated-block
[repeatContext]=\\"data.context\\"
Expand Down
Loading

0 comments on commit be584a0

Please sign in to comment.