Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import * as React from 'react';
import { OuterWrapper, Header, SearchInputBox, FormWrapperBox, } from './styled';
import { wording } from './fixture';
import { handleSubmit, setRefineValuesToPreFill, getOrderIdToPreFill } from './deps';
import { renderOrderStatusDropDown, renderOrderDateDropDown } from './renderProps';
/**
 * @todo Pure or Observer, unless we pass props that are deep and not observers
 */
class OrderHeader extends React.PureComponent {
    constructor() {
        super(...arguments);
        this.renderFormWrapper = () => {
            const { orderDate, orderStatus } = setRefineValuesToPreFill();
            return (React.createElement(FormWrapperBox, null,
                this.renderSearchInput(),
                renderOrderDateDropDown(orderDate),
                renderOrderStatusDropDown(orderStatus)));
        };
    }
    renderSearchInput() {
        const orderIdToPreFill = getOrderIdToPreFill();
        return (React.createElement(SearchInputBox, { placeholder: wording.searchPlaceHolder, onSubmit: handleSubmit, maxLength: "50", value: orderIdToPreFill, validationType: 'orderId', errorMessageFor: 'orderId', className: "" }));
    }
    render() {
        // @todo the below FormWrapper instead of FormWrapperBox
        // will used once we start using the Form Interface
        // other code are in readme file
        // <FormWrapper />
        return (React.createElement(OuterWrapper, null,
            React.createElement(Header, { "data-qa": "qa-order-header" }, "Your Orders"),
            this.renderFormWrapper()));
    }
}
export { OrderHeader };
export default OrderHeader;
//# sourceMappingURL=OrderHeader.js.map