UNPKG

@acoustic-content-sdk/redux-feature-auth-layout

Version:

Implementation of a redux feature to manage authoring layouts.

97 lines (70 loc) 3.66 kB
/** * Implementation of a redux feature to manage authoring layouts. * * @packageDocumentation */ import { AuthoringLayoutItem } from '@acoustic-content-sdk/api'; import { PayloadAction } from '@acoustic-content-sdk/redux-store'; import { Reducer } from 'redux'; import { UnaryFunction } from 'rxjs'; export declare const ACTION_ADD_AUTH_LAYOUT = "ACTION_ADD_AUTH_LAYOUT"; export declare const ACTION_ADD_AUTH_LAYOUT_IF_NONEXISTENT = "ACTION_ADD_AUTH_LAYOUT_IF_NONEXISTENT"; export declare const ACTION_GUARANTEE_AUTH_LAYOUT = "ACTION_GUARANTEE_AUTH_LAYOUT"; export declare const ACTION_LOAD_AUTH_LAYOUT = "ACTION_LOAD_AUTH_LAYOUT"; /** * Do not add a side effect to this action */ export declare const ACTION_SET_AUTH_LAYOUT = "ACTION_SET_AUTH_LAYOUT"; export declare type AddAuthoringLayoutAction = PayloadAction<AuthoringLayoutItem>; export declare const addAuthoringLayoutAction: UnaryFunction<AuthoringLayoutItem, AddAuthoringLayoutAction>; export declare type AddAuthoringLayoutIfNonExistentAction = AddAuthoringLayoutAction; /** * Adds this content item to the store only if the item does not exist, yet. If the item * does not exist, this triggers a {@link addAuthoringLayoutAction}. * * @param aItem - the content item to add * @returns the action */ export declare const addAuthoringLayoutIfNonExistentAction: UnaryFunction<AuthoringLayoutItem, AddAuthoringLayoutIfNonExistentAction>; export declare const AUTH_LAYOUT_FEATURE = "authLayout"; /** */ export declare const authLayoutFeatureReducer: { authLayout: import("redux").Reducer<Record<string, import("@acoustic-content-sdk/api").AuthoringLayoutItem>, import("./auth.layout.actions").AddAuthoringLayoutAction | import("./auth.layout.actions").SetAuthoringLayoutAction>; }; /** */ export declare interface AuthLayoutFeatureState { [AUTH_LAYOUT_FEATURE]: AuthoringLayoutState; } /** * Exposes the feature module selector */ export declare const authoringLayoutFeature: import("@acoustic-content-sdk/redux-store").ReduxFeatureModule<Record<string, import("@acoustic-content-sdk/api").AuthoringLayoutItem>, AuthLayoutFeatureState, import("redux").AnyAction, import("redux").AnyAction, any>; /** * reducers for authoring content */ export declare const authoringLayoutReducer: Reducer<AuthoringLayoutState, AddAuthoringLayoutAction | SetAuthoringLayoutAction>; export declare type AuthoringLayoutState = Record<string, AuthoringLayoutItem>; export declare type GuaranteeAuthoringLayoutAction = PayloadAction<string>; export declare const guaranteeAuthoringLayoutAction: UnaryFunction<string, GuaranteeAuthoringLayoutAction>; export declare type LoadAuthoringLayoutAction = PayloadAction<string>; export declare const loadAuthoringLayoutAction: UnaryFunction<string, LoadAuthoringLayoutAction>; /** * Select the authoring type feature */ export declare const selectAuthLayoutFeature: import("rxjs").UnaryFunction<Record<string, any>, Record<string, import("@acoustic-content-sdk/api").AuthoringLayoutItem>>; export declare const selectAuthoringLayout: UnaryFunction<string, UnaryFunction<AuthoringLayoutState, AuthoringLayoutItem>>; export declare type SetAuthoringLayoutAction = PayloadAction<AuthoringLayoutItem>; export declare const setAuthoringLayoutAction: UnaryFunction<AuthoringLayoutItem, SetAuthoringLayoutAction>; /** Version and build number of the package */ export declare const VERSION: { version: { major: string; minor: string; patch: string; branch: string; }; build: Date; }; export { }