-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* chore(#28): add DruxtEntityForm example * feat(#317): add createResource method * feat(#318): add updateResource method * chore(#307): update to use CRUD methods * chore(#307): update tests * chore(#307): update test coverage
- Loading branch information
Showing
19 changed files
with
562 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt": minor | ||
--- | ||
|
||
Added updateResource method to DruxtClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt-entity": minor | ||
--- | ||
|
||
Updated DruxtEntityForm to use new DruxtClient methods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"druxt": minor | ||
--- | ||
|
||
Added createResource method to DruxtClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# entity-form | ||
|
||
This directory contains an example of the DruxtEntityForm component in Nuxt. | ||
|
||
## Setup | ||
|
||
``` | ||
yarn && yarn dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
buildModules: [['druxt-entity', { baseUrl: process.env.BASE_URL || 'https://demo-api.druxtjs.org' }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "entity-form", | ||
"private": true, | ||
"packageManager": "yarn@3.0.0", | ||
"scripts": { | ||
"dev": "nuxt" | ||
}, | ||
"dependencies": { | ||
"druxt-site": "link:../../../packages/druxt-entity", | ||
"nuxt": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<div> | ||
<h1>DruxtEntityForm example:</h1> | ||
|
||
<h2>Contact form - Basic</h2> | ||
<pre><code><DruxtEntityForm type="contact_message--feedback" /></code></pre> | ||
|
||
<pre v-if="response"> | ||
<code>{{ JSON.stringify(response, null, ' ') }}</code> | ||
</pre> | ||
|
||
<DruxtEntityForm | ||
type="contact_message--feedback" | ||
@error="setResponse" | ||
@submit="setResponse" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data: () => ({ | ||
response: null, | ||
}), | ||
methods: { | ||
setResponse(response) { | ||
this.response = response; | ||
}, | ||
}, | ||
}; | ||
</script> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.