PHP 8.2.30
Preview: store.ts Size: 1.82 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/frontend/store/store.ts

// Note: We are using legacy "createStore"
import { composeWithDevToolsDevelopmentOnly } from '@redux-devtools/extension'
import { combineReducers, legacy_createStore as createStore } from 'redux'

import type { Assets, BrandingOptions, VersionProps } from '../../adminjs-options.interface.js'
import {
  assetsReducer,
  brandingReducer,
  dashboardReducer,
  drawerReducer,
  filterDrawerReducer,
  localesReducer,
  modalReducer,
  noticesReducer,
  pagesReducer,
  pathsReducer,
  resourcesReducer,
  routerReducer,
  sessionReducer,
  themeReducer,
  versionsReducer,
  type DashboardInState,
  type DrawerInState,
  type FilterDrawerInState,
  type LolcaleInState,
  type ModalInState,
  type NoticesInState,
  type PagesInState,
  type PathsInState,
  type ResourcesInState,
  type RouterInState,
  type SessionInState,
  type ThemeInState,
} from './reducers/index.js'

export type ReduxState = {
  assets: Assets
  branding: BrandingOptions
  dashboard: DashboardInState
  drawer: DrawerInState
  filterDrawer: FilterDrawerInState
  locale: LolcaleInState
  modal: ModalInState
  notices: NoticesInState
  pages: PagesInState
  paths: PathsInState
  resources: ResourcesInState
  router: RouterInState
  session: SessionInState
  theme?: ThemeInState
  versions: VersionProps
}

const reducer = combineReducers<ReduxState>({
  assets: assetsReducer,
  branding: brandingReducer,
  dashboard: dashboardReducer,
  drawer: drawerReducer,
  filterDrawer: filterDrawerReducer,
  locale: localesReducer,
  modal: modalReducer,
  notices: noticesReducer,
  pages: pagesReducer,
  paths: pathsReducer,
  resources: resourcesReducer,
  router: routerReducer,
  session: sessionReducer,
  theme: themeReducer,
  versions: versionsReducer,
})

export default (initialState = {}) => createStore(
  reducer,
  initialState,
  composeWithDevToolsDevelopmentOnly(),
)

Directory Contents

Dirs: 3 × Files: 3

Name Size Perms Modified Actions
actions DIR
- drwxr-xr-x 2026-02-28 00:32:44
Edit Download
reducers DIR
- drwxr-xr-x 2026-02-28 00:32:46
Edit Download
utils DIR
- drwxr-xr-x 2026-02-28 00:32:40
Edit Download
188 B lrw-r--r-- 2026-02-28 00:32:28
Edit Download
2.25 KB lrw-r--r-- 2026-02-28 00:32:28
Edit Download
1.82 KB lrw-r--r-- 2026-02-28 00:32:44
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).