Skip to content

Commit

Permalink
Refactor: bindings type (BuilderIO#997)
Browse files Browse the repository at this point in the history
* tidy

* more cleanup

* refactor

* fix

fix

* add event-action-spread

* enforce binding property

* fix imports

* fix

* fix

* tweak

* cleanup

* fix

* update snapshots

* update

* simplify

* fix?

* fix

* cleanup

* update tests

* remove redundant undefined

* fix
  • Loading branch information
samijaber authored Jan 24, 2023
1 parent 3a6768e commit 54143d4
Show file tree
Hide file tree
Showing 33 changed files with 843 additions and 508 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -903,9 +903,11 @@ exports[`Builder > Regenerate custom Hero 1`] = `
boxSizing: \\"border-box\\",
marginTop: \\"200px\\"
}",
"type": "single",
},
"height": {
"code": "400",
"type": "single",
},
},
"children": [],
Expand Down
11 changes: 11 additions & 0 deletions packages/core/src/__tests__/__snapshots__/context.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ exports[`Context > Use and set context in complex components 1`] = `
"bindings": {
"state.properties": {
"code": "state.properties",
"spreadType": "normal",
"type": "spread",
},
"style": {
"code": "state.css",
"type": "single",
},
},
"children": [
Expand All @@ -128,6 +130,7 @@ exports[`Context > Use and set context in complex components 1`] = `
"bindings": {
"block": {
"code": "state.useBlock",
"type": "single",
},
},
"children": [],
Expand All @@ -153,6 +156,7 @@ exports[`Context > Use and set context in complex components 1`] = `
"bindings": {
"when": {
"code": "state.componentRef",
"type": "single",
},
},
"children": [
Expand All @@ -161,9 +165,11 @@ exports[`Context > Use and set context in complex components 1`] = `
"bindings": {
"children": {
"code": "state.useBlock.children",
"type": "single",
},
"state.componentOptions": {
"code": "state.componentOptions",
"spreadType": "normal",
"type": "spread",
},
},
Expand Down Expand Up @@ -196,6 +202,7 @@ exports[`Context > Use and set context in complex components 1`] = `
"bindings": {
"when": {
"code": "!state.componentRef && state.useBlock.children && state.useBlock.children.length",
"type": "single",
},
},
"children": [
Expand All @@ -216,6 +223,7 @@ exports[`Context > Use and set context in complex components 1`] = `
"bindings": {
"each": {
"code": "state.useBlock.children",
"type": "single",
},
},
"children": [
Expand All @@ -224,9 +232,11 @@ exports[`Context > Use and set context in complex components 1`] = `
"bindings": {
"block": {
"code": "child",
"type": "single",
},
"index": {
"code": "index",
"type": "single",
},
},
"children": [],
Expand Down Expand Up @@ -607,6 +617,7 @@ exports[`Context > Use and set context in components 1`] = `
"bindings": {
"_text": {
"code": "foo.value",
"type": "single",
},
},
"children": [],
Expand Down
Loading

0 comments on commit 54143d4

Please sign in to comment.