@bpmn-io/form-js-playground
Advanced tools
Comparing version 0.9.8 to 0.9.9
@@ -231,3 +231,3 @@ import { render } from 'preact'; | ||
const [schema, setSchema] = useState(props.schema); | ||
const [resultData, setResultData] = useState(props.data || {}); // pipe to playground API | ||
const [resultData, setResultData] = useState({}); // pipe to playground API | ||
@@ -243,3 +243,6 @@ useEffect(() => { | ||
get: (name, strict) => formEditorRef.current.get(name, strict), | ||
getDataEditor: () => dataEditorRef.current, | ||
getEditor: () => formEditorRef.current, | ||
getForm: () => formRef.current, | ||
getResultView: () => resultViewRef.current, | ||
getSchema: () => formEditorRef.current.getSchema(), | ||
@@ -283,4 +286,4 @@ setSchema: setInitialSchema, | ||
}); | ||
form.on('changed', event => { | ||
setResultData(event.data); | ||
form.on('changed', () => { | ||
setResultData(form._getSubmitData()); | ||
}); | ||
@@ -469,17 +472,10 @@ dataEditor.on('changed', event => { | ||
this.getSchema = withRef(function () { | ||
return ref.getSchema(); | ||
}); | ||
this.setSchema = withRef(function (schema) { | ||
return ref.setSchema(schema); | ||
}); | ||
this.saveSchema = withRef(function () { | ||
return ref.saveSchema(); | ||
}); | ||
this.get = withRef(function (name, strict) { | ||
return ref.get(name, strict); | ||
}); | ||
this.getEditor = withRef(function () { | ||
return ref.getEditor(); | ||
}); | ||
this.getSchema = withRef(() => ref.getSchema()); | ||
this.setSchema = withRef(schema => ref.setSchema(schema)); | ||
this.saveSchema = withRef(() => ref.saveSchema()); | ||
this.get = withRef((name, strict) => ref.get(name, strict)); | ||
this.getDataEditor = withRef(() => ref.getDataEditor()); | ||
this.getEditor = withRef(() => ref.getEditor()); | ||
this.getForm = withRef((name, strict) => ref.getForm(name, strict)); | ||
this.getResultView = withRef(() => ref.getResultView()); | ||
@@ -490,20 +486,8 @@ this.destroy = function () { | ||
this.attachEditorContainer = withRef(function (node) { | ||
return ref.attachEditorContainer(node); | ||
}); | ||
this.attachPreviewContainer = withRef(function (node) { | ||
return ref.attachFormContainer(node); | ||
}); | ||
this.attachDataContainer = withRef(function (node) { | ||
return ref.attachDataContainer(node); | ||
}); | ||
this.attachResultContainer = withRef(function (node) { | ||
return ref.attachResultContainer(node); | ||
}); | ||
this.attachPaletteContainer = withRef(function (node) { | ||
return ref.attachPaletteContainer(node); | ||
}); | ||
this.attachPropertiesPanelContainer = withRef(function (node) { | ||
return ref.attachPropertiesPanelContainer(node); | ||
}); | ||
this.attachEditorContainer = withRef(node => ref.attachEditorContainer(node)); | ||
this.attachPreviewContainer = withRef(node => ref.attachFormContainer(node)); | ||
this.attachDataContainer = withRef(node => ref.attachDataContainer(node)); | ||
this.attachResultContainer = withRef(node => ref.attachResultContainer(node)); | ||
this.attachPaletteContainer = withRef(node => ref.attachPaletteContainer(node)); | ||
this.attachPropertiesPanelContainer = withRef(node => ref.attachPropertiesPanelContainer(node)); | ||
} | ||
@@ -510,0 +494,0 @@ |
export function EmbedModal(props: any): any; |
@@ -0,0 +0,0 @@ export function JSONEditor(options?: {}): void; |
export function Modal(props: any): any; |
export function PlaygroundRoot(props: any): any; |
@@ -0,0 +0,0 @@ export function Section(props: any): any; |
export { default as Playground } from "./Playground"; |
@@ -50,3 +50,6 @@ /** | ||
get: (...args: any[]) => any; | ||
getDataEditor: (...args: any[]) => any; | ||
getEditor: (...args: any[]) => any; | ||
getForm: (...args: any[]) => any; | ||
getResultView: (...args: any[]) => any; | ||
destroy: () => void; | ||
@@ -53,0 +56,0 @@ attachEditorContainer: (...args: any[]) => any; |
{ | ||
"name": "@bpmn-io/form-js-playground", | ||
"version": "0.9.8", | ||
"version": "0.9.9", | ||
"description": "A form-js playground", | ||
@@ -47,4 +47,4 @@ "files": [ | ||
"dependencies": { | ||
"@bpmn-io/form-js-editor": "^0.9.8", | ||
"@bpmn-io/form-js-viewer": "^0.9.8", | ||
"@bpmn-io/form-js-editor": "^0.9.9", | ||
"@bpmn-io/form-js-viewer": "^0.9.9", | ||
"@codemirror/lang-json": "^6.0.0", | ||
@@ -70,3 +70,3 @@ "@codemirror/state": "^6.1.1", | ||
}, | ||
"gitHead": "357dfcdd0c046494c54e26b35e415e0e688f8f7c" | ||
"gitHead": "a0c48668fabc92d210bd5675986715f262192d77" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1977155
37809