Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resolvedSchema => {
this.editor.setInnerComponent(
TreeRenderer,
{
uischema: getUiSchema(this._store.getState()),
schema: resolvedSchema.resolved,
filterPredicate: this._filterPredicate,
labelProvider: this._labelProvider,
imageProvider: this._imageProvider
});
this.editor.store = this._store;
const exportButton = document.getElementById('export-data-button') as HTMLButtonElement;
if (exportButton !== null) {
const exportDialog = createExportDataDialog();
document.body.appendChild(exportDialog);
configureExportButton(this, exportButton, exportDialog);
}
// button triggering the hidden input element - only activate after schemas was loaded
const uploadButton = document.getElementById('upload-data-button') as HTMLButtonElement;
).then(resolvedSchema => {
this._store = setupStore(
resolvedSchema as any,
getUiSchema(store.getState()),
data
);
this.render();
});
}
setReadonly() {
const uischema = getUiSchema(this.ngRedux.getState());
if (this.readonly) {
unsetReadonly(uischema);
} else {
setReadonly(uischema);
}
this.readonly = !this.readonly;
this.ngRedux.dispatch(Actions.setUISchema(uischema));
}
}
const mapStateToProps = (state: JsonFormsState, ownProps: any) => {
const rootData = getData(state);
return {
rootData,
classes: ownProps.classes,
onClose: ownProps.onClose,
open: ownProps.open,
uischema: getUiSchema(state)
};
};
labelProviders,
imageProvider
}: AppParameter) => (
);
const resetServices = () => {
const jsonforms = document.getElementsByTagName('json-forms')[0] as JsonFormsElement;
const currentState = jsonforms.store.getState();
jsonforms.store.dispatch({
type: Actions.INIT,
data,
schema: getSchema(currentState),
uischema: getUiSchema(currentState),
styles: currentState.styles
});
};
const tester = () => 5;