How to use the @webiny/app-page-builder/editor/selectors.getPage function in @webiny/app-page-builder

To help you get started, we’ve selected a few @webiny/app-page-builder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / app-page-builder / src / editor / actions / actions.js View on Github external
addMiddleware([SAVING_REVISION], ({ store, next, action }) => {
    next(action);

    const data: Object = getPage(store.getState());
    if (data.locked) {
        return;
    }

    // Construct page payload
    const revision = pick(data, ["title", "snippet", "url", "settings"]);
    revision.content = data.content.present;
    revision.category = data.category.id;

    // Check if API call is necessary
    if (!dataChanged(revision)) {
        return;
    }

    lastSavedRevision = revision;
github webiny / webiny-js / packages / app-page-builder / src / editor / plugins / defaultBar / components / PageSettings.js View on Github external
        state => ({ page: omit(getPage(state), ["content"]) }),
        { deactivatePlugin, updateRevision }
github webiny / webiny-js / packages / app-page-builder / src / editor / components / Editor / Content.js View on Github external
const stateToProps = state => ({
    rootElement: state.elements[getContent(state).id],
    layout: get(getPage(state), "settings.general.layout"),
    renderLayout: isPluginActive("pb-editor-toolbar-preview")(state)
});
github webiny / webiny-js / packages / app-page-builder / src / editor / plugins / defaultBar / components / Title.js View on Github external
state => {
            const { title, version, locked, category } = getPage(state);
            return {
                pageTitle: title,
                pageVersion: version,
                pageLocked: locked,
                pageCategory: category.name,
                pageCategoryUrl: category.url
            };
        },
        { updateRevision }
github webiny / webiny-js / packages / app-page-builder / src / editor / actions / actions.js View on Github external
({ store, next, action }) => {
        next(action);

        const { onFinish } = action.meta || {};

        if (action.type === UPDATE_ELEMENT && action.payload.history === false) {
            return;
        }

        const page = getPage(store.getState());
        if (page.locked) {
            return;
        }

        if (debouncedSave) {
            debouncedSave.cancel();
        }

        debouncedSave = debounce(() => store.dispatch(saveRevision(null, { onFinish })), 1000);
        debouncedSave();
    }
);

@webiny/app-page-builder

[![](https://img.shields.io/npm/dw/@webiny/app-page-builder.svg)](https://www.npmjs.com/package/@webiny/app-page-builder) [![](https://img.shields.io/npm/v/@webiny/app-page-builder.svg)](https://www.npmjs.com/package/@webiny/app-page-builder) [![code sty

MIT
Latest version published 2 days ago

Package Health Score

80 / 100
Full package analysis

Similar packages