UNPKG

@shopify/app-bridge-host

Version:

App Bridge Host contains middleware and components that are meant to be consumed by the app's host. The middleware and `Frame` component are responsible for facilitating messages posted between the client and host, and used to act on actions sent from the

77 lines (76 loc) 3.05 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); var redux_1 = require("redux"); var appInfo_1 = __importStar(require("./appInfo")); var features_1 = __importStar(require("./features")); var toast_1 = __importStar(require("./toast")); var loading_1 = __importStar(require("./loading")); var modal_1 = __importStar(require("./modal")); var titleBar_1 = __importStar(require("./titleBar")); var resourcePicker_1 = __importStar(require("./resourcePicker")); var navigation_1 = __importStar(require("./navigation")); var pos_1 = __importStar(require("./pos")); var utilities_1 = require("./utilities"); var staffMember_1 = __importStar(require("./staffMember")); var legacy_1 = __importStar(require("./legacy")); var fullscreen_1 = __importStar(require("./fullscreen")); var contextualSaveBar_1 = __importStar(require("./contextualSaveBar")); /** * The interface for the app's default state * @internal */ exports.defaultStore = { appInfo: appInfo_1.defaultAppInfoStore, contextualSaveBar: contextualSaveBar_1.defaultContextualSaveBarStore, features: features_1.defaultFeaturesStore, toast: toast_1.defaultToastStore, loading: loading_1.defaultLoadingStore, modal: modal_1.defaultModalStore, titleBar: titleBar_1.defaultTitlebarStore, pos: pos_1.defaultPOSStore, resourcePicker: resourcePicker_1.defaultResourcePickerStore, navigation: navigation_1.defaultNavigationStore, staffMember: staffMember_1.defaultStaffMemberStore, isLegacy: legacy_1.defaultLegacyStore, isFullscreen: fullscreen_1.defaultFullscreenStore, }; var appStateReducers = utilities_1.wrapReducers({ contextualSaveBar: contextualSaveBar_1.default, toast: toast_1.default, loading: loading_1.default, modal: modal_1.default, titleBar: titleBar_1.default, resourcePicker: resourcePicker_1.default, navigation: navigation_1.default, isFullscreen: fullscreen_1.default, }, utilities_1.resetStateReducer); /** * The combined Redux reducers * @internal */ function getReducers() { return redux_1.combineReducers(utilities_1.wrapReducers(__assign({ appInfo: appInfo_1.default, features: features_1.default, pos: pos_1.default, staffMember: staffMember_1.default, isLegacy: legacy_1.default }, appStateReducers), utilities_1.resetAppReducer)); } exports.default = getReducers;