#2609: context.tsx
projectforge-webapp/src/components/base/dynamicLayout/context.tsx TypeScript React Context Definition, projectforge-webapp/src/components/base/dynamicLayout/context.tsx 215 lines · 48 code · 164 comments · 3 blank
Defines the DynamicLayoutContext (React.createContext) and DynamicLayout TypeScript interface for the server-driven dynamic layout system (counterpart to UILayout.kt). Context shape: callAction(action) — dispatches server-delivered UI actions, data — reactive store for input field values, isFetching — loading state, options — toggles (disableLayoutRendering, displayPageMenu, setBrowserTitle, showActionButtons, showPageMenuTitle), renderLayout(content) — declarative layout renderer from JSON array, setData/setVariables — state setters with callback/promise support, ui.translations — key/value i18n map from server, validationErrors[] — server-side validation results, variables — server-provided edit layout data (AbstractBaseRest.kt > EditLayoutData). Exports defaults that throw "not implemented yet" errors. Used by all dynamic layout components via React.useContext(DynamicLayoutContext).
Git History
033629f77 fix typescript eslint bugs
c66bf8f62 WIP: multi upload
253b9f38b update some deps and fix eslint errors
bbd81edc3 es-lint, new js versions.
508e382e8 #67 implement form page loading indicator