UNPKG

@zextras/carbonio-shell-ui

Version:

The Zextras Carbonio web client

38 lines 2.08 kB
"use strict"; /* * SPDX-FileCopyrightText: 2024 Zextras <https://www.zextras.com> * * SPDX-License-Identifier: AGPL-3.0-only */ Object.defineProperty(exports, "__esModule", { value: true }); exports.getAppDependantExports = void 0; const edit_settings_1 = require("../../network/edit-settings"); const app_1 = require("../../store/app"); const utils_1 = require("../../store/app/utils"); const boards_1 = require("../../store/boards"); const hooks_1 = require("../../store/i18n/hooks"); const store_1 = require("../../store/integrations/store"); const getAppDependantExports = (pkg) => { const appStore = app_1.useAppStore.getState(); const integrations = store_1.useIntegrationsStore.getState(); return { setAppContext: appStore.setAppContext(pkg.name), addRoute: (route) => appStore.addRoute((0, utils_1.normalizeRoute)(route, pkg)), addBoardView: (data) => appStore.addBoardView((0, utils_1.normalizeBoardView)(data, pkg)), addSettingsView: (data) => appStore.addSettingsView((0, utils_1.normalizeSettingsView)(data, pkg)), addUtilityView: (data) => appStore.addUtilityView((0, utils_1.normalizeUtilityView)(data, pkg)), addPrimaryAccessoryView: (data) => appStore.addPrimaryAccessoryView((0, utils_1.normalizePrimaryAccessoryView)(data, pkg)), addSecondaryAccessoryView: (data) => appStore.addSecondaryAccessoryView((0, utils_1.normalizeSecondaryAccessoryView)(data, pkg)), registerComponents: integrations.registerComponents(pkg.name), editSettings: (0, edit_settings_1.getEditSettingsForApp)(pkg.name), getI18n: (0, hooks_1.getI18n)(pkg.name), t: (0, hooks_1.getTFunction)(pkg.name), useAppContext: (0, app_1.getAppContextHook)(pkg.name), getAppContext: (0, app_1.getAppContext)(pkg.name), useApp: (0, app_1.getAppHook)(pkg.name), getApp: (0, app_1.getApp)(pkg.name), addBoard: (0, boards_1.addBoard)(pkg.name) }; }; exports.getAppDependantExports = getAppDependantExports; //# sourceMappingURL=app-dependant-exports.js.map