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:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const exotic_1 = require("exotic");
const config_1 = require("./config");
const _fixture_1 = require("./_fixture");
// >>>>>>>>
// we were running this on every render
// now we run this 1x
exports.fromPropsToInputChain = (props) => {
    // console.log('fromPropsToInputChain', props)
    const isSatisfiedByProps = chain => chain.isSatisfiedByProps(props);
    const InputChainDecorator = config_1.inputChains.find(isSatisfiedByProps);
    // console.log(InputChainDecorator)
    // @todo pass in form
    if (exotic_1.isSafe(InputChainDecorator)) {
        const instance = new InputChainDecorator();
        // console.log({ instance })
        return instance;
    }
    else {
        console.warn('[InputChain] fromPropsToInputChain COULD NOT FIND CHAIN');
        console.dir(props);
    }
    return -0;
};
exports.isVisible = isHidden => exotic_1.isUndefined(isHidden) || (exotic_1.isSafe(isHidden) && !isHidden);
// @todo @fixme @exotic dunno why
// if (hasOwnProp(types, key) === true) {
exports.hasType = key => Object.prototype.hasOwnProperty.call(_fixture_1.types, key);
exports.unknown = (key, value) => {
    // unknown
    const msg = 'unknown data ' + JSON.stringify({ [key]: value });
    // @todo - but not on server
    // const unknown = new Error(msg)
    // console.error(unknown)
    // console.warn(msg)
};
exports.shouldRemap = key => {
    return key === 'identifier';
};
// because nested will always be observable...
// types.dynamicState = types
//# sourceMappingURL=deps.js.map