@sassoftware/viyaeditmui - A component for data entry applications in SAS Viya
Script Tag
<script type="text/javascript" src="https://unpkg.com/@sassoftware/viyaeditmui></script>
The exported global is ViyaEditMui
Why Mui? This sample component uses MUI V5 to demonstrate how to use @sassoftware/restafedit to build data entry applictions. Adding MUI to the name is a way of giving them credit. You should use the component library of your choice. Also feel free to clone and improve this component library.
Examples
Please see the repo for examples. If you are interested in writing applications to run in SAS VA (DDC and/or web content) the ViyaEditorDDC folder in the repository would be of interest.
Exported Entries
Two entries are exported.
ViyaDataEditor
The component to display either a table or a form for editing CAS or SAS datasets.
The props are:
viyaConnection - information for connecting to SAS Viya
appControl - application control information.
Please see @sassoftware/restafedit for details on these objects.
If you plan to use this component in a html page please see this link for guidance. Here is a sample:
const createRoot = ReactDOM.createRoot;
const container = document.getElementById('container1');
const root = createRoot(container);
const ViyaDataEditor = ViyaEditMui.ViyaDataEditor;
root.render(
<ViyaDataEditor viyaConnection={LOGONPAYLOAD}
appControl ={ appControlCurrent }
/>);
An alternative is to use the method below
display
This eliminates the need to use ReactDOM directly in the html page.
Use it as follows: const props = { ViyaConnection, appControl }; ViyaEditMui.display( props, 'name of a div'