import DictionaryForm, { ValueType } from "./Dictionary";
import React from "react";
const DictionaryOfStrings = (props) => {
    return (
    // only allow text values
    React.createElement(DictionaryForm, Object.assign({}, props, { valueTypes: [ValueType.Text], onChange: (value) => {
            /*
             * Operators are not enabled here, so values come back as bare
             * strings/numbers/booleans only.
             */
            const stringDict = {};
            for (const key of Object.keys(value)) {
                const entry = value[key];
                if (entry === undefined || entry === null) {
                    continue;
                }
                stringDict[key] = entry.toString();
            }
            if (props.onChange) {
                props.onChange(stringDict);
            }
        } })));
};
export default DictionaryOfStrings;
//# sourceMappingURL=DictionaryOfStrings.js.map