UNPKG

@j2inn/app-react

Version:

React implementation of the j2inn-app framework

67 lines (66 loc) 1.67 kB
/* * Copyright (c) 2022, J2 Innovations. All Rights Reserved */ /** * A simple application root store used for development/testing purposes. */ export class DevAppRootStore { constructor() { this.currentApps = []; this.project = ''; this.sidebarOpen = false; this.currentLocale = ''; this.currentAllLocales = []; this.target = ''; this.targetSidebar = ''; this.history = { state: {}, pushState: (state) => { this.history.state = state; }, replaceState: (state) => { this.history.state = state; }, }; this.historySidebar = { state: {}, pushState: (state) => { this.historySidebar.state = state; }, replaceState: (state) => { this.historySidebar.state = state; }, }; this.currentUserDict = undefined; } get app() { return this.currentApp; } get sidebar() { return this.currentSidebar; } get apps() { return this.currentApps; } open() { } openAppInNewWindow() { } openSidebar() { } get locale() { return this.currentLocale; } get allLocales() { return this.currentAllLocales; } get currentUser() { return this.currentUserDict; } hasSidebar() { return false; } postAppMessage() { } registerSidebars() { } unregisterSidebars() { } hasAppAccess() { return true; } }