public/fullcalendar/resource-common/main.esm.js
/*
needs a full store so that it can populate children too
*/
needs a full store so that it can populate children too
needs a full store so that it can populate children too
function parseResource(input, parentId, store, calendar) {
    if (parentId === void 0) { parentId = ''; }
    var leftovers0 = {};
    var props = refineProps(input, RESOURCE_PROPS, {}, leftovers0);
    var leftovers1 = {};
    var ui = processScopedUiProps('event', leftovers0, calendar, leftovers1);
    if (!props.id) {
        props.id = PRIVATE_ID_PREFIX + (uid$2++);
    }
    if (!props.parentId) { 
        props.parentId = parentId;
    }
    props.businessHours = props.businessHours ? parseBusinessHours(props.businessHours, calendar) : null;
    props.ui = ui;
    props.extendedProps = __assign({}, leftovers1, props.extendedProps);
    Object.freeze(ui.classNames);
    Object.freeze(props.extendedProps);
    if (store[props.id]) ;
    else {
        store[props.id] = props;
        if (props.children) {
            for (var _i = 0, _a = props.children; _i < _a.length; _i++) {
                var childInput = _a[_i];
                parseResource(childInput, props.id, store, calendar);
            }
            delete props.children;
        }
    }
    return props;
}
function parseResource ( input , parentId , store , calendar ) { if ( parentId === void 0 ) { parentId = '' ; } var leftovers0 = { } ; var props = refineProps ( input , RESOURCE_PROPS , { } , leftovers0 ) ; var leftovers1 = { } ; var ui = processScopedUiProps ( 'event' , leftovers0 , calendar , leftovers1 ) ; if ( ! props . id ) { props . id = PRIVATE_ID_PREFIX + ( uid$2 ++ ) ; } if ( ! props . parentId ) { props . parentId = parentId ; } props . businessHours = props . businessHours ? parseBusinessHours ( props . businessHours , calendar ) : null ; props . ui = ui ; props . extendedProps = __assign ( { } , leftovers1 , props . extendedProps ) ; Object . freeze ( ui . classNames ) ; Object . freeze ( props . extendedProps ) ; if ( store [ props . id ] ) ; else { store [ props . id ] = props ; if ( props . children ) { for ( var _i = 0 , _a = props . children ; _i < _a . length ; _i ++ ) { var childInput = _a [ _i ] ; parseResource ( childInput , props . id , store , calendar ) ; } delete props . children ; } } return props ; }
needs a full store so that it can populate children too
needs a full store so that it can populate children too
// give precedence to the parentId property // help out ResourceApi from having user modify props