@eduzz/form-builder
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "@eduzz/form-builder", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"private": false, | ||
@@ -19,14 +19,14 @@ "main": "./index.js", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4", | ||
"@babel/plugin-proposal-optional-chaining": "7.7.4", | ||
"@babel/plugin-proposal-optional-chaining": "7.7.5", | ||
"@material-ui/core": "4.7.1", | ||
"@react-form-fields/material-ui": "3.0.0-alpha.11", | ||
"@sentry/browser": "5.10.0", | ||
"@sentry/browser": "5.10.2", | ||
"@types/jest": "24.0.23", | ||
"@types/lodash": "4.14.149", | ||
"@types/node": "12.12.14", | ||
"@types/react": "16.9.14", | ||
"@types/node": "12.12.15", | ||
"@types/react": "16.9.16", | ||
"@types/react-dom": "16.9.4", | ||
"@types/react-jss": "10.0.0", | ||
"@typescript-eslint/eslint-plugin": "2.10.0", | ||
"@typescript-eslint/parser": "2.10.0", | ||
"@typescript-eslint/eslint-plugin": "2.11.0", | ||
"@typescript-eslint/parser": "2.11.0", | ||
"axios": "0.19.0", | ||
@@ -40,3 +40,3 @@ "cross-env": "6.0.3", | ||
"lodash": "4.17.15", | ||
"mdi-react": "6.4.0", | ||
"mdi-react": "6.5.0", | ||
"mock-require": "3.0.3", | ||
@@ -47,3 +47,3 @@ "prettier": "1.19.1", | ||
"react-jss": "10.0.0", | ||
"react-scripts": "3.2.0", | ||
"react-scripts": "3.3.0", | ||
"rxjs": "6.5.3", | ||
@@ -50,0 +50,0 @@ "typescript": "3.7.3" |
@@ -7,3 +7,17 @@ # Eduzz Form Builder | ||
In Browser | ||
Generate a access token (Backend) | ||
```js | ||
axios.post('https://formbuilder-api.eduzz.com/v1/auth/generate-access', { | ||
"account": "your-account", | ||
"secretKey": "your-secret-key", | ||
"formRef": "form-ref", | ||
"clientReference": "client-who-will-answer-ref", | ||
"tags": ["some-tag"] // <~ optional | ||
}, { | ||
headers: { 'Accept': 'application/json', "Content-Type": "application/json" } | ||
} | ||
}) | ||
``` | ||
Via Browser | ||
```js | ||
@@ -18,3 +32,3 @@ (function (d, l, c) { | ||
window.EduzzFormBuilder({ | ||
accessToken, // <~ generate by the backend | ||
accessToken: "...", | ||
element: document.getElementById('content'), // optional, if not provided a modal will be opened | ||
@@ -28,7 +42,6 @@ onCompleted: (result, event) => { console.table({ event, result }) } | ||
```ts | ||
// EduzzQuiz.ts <~ create in your applocation | ||
import EduzzFormBuilder from '@eduzz/apps-toolbar'; | ||
EduzzFormBuilder({ | ||
accessToken, // <~ generate by the backend | ||
accessToken: "...", | ||
element: document.getElementById('content'), // optional, if not provided a modal will be opened | ||
@@ -35,0 +48,0 @@ onCompleted: (result, event) => { console.table({ event, result }) } |
@@ -13,2 +13,3 @@ // eslint-disable-next-line @typescript-eslint/interface-name-prefix | ||
onCompleted?: (result: import('interfaces/result').IResult, event: 'form-saved' | 'form-closed') => any; | ||
extra?: any; | ||
} |
Sorry, the diff of this file is too big to display
863798
3280
47