@rokt/dcui-orchestrator 0.0.4-rc.26 → 0.0.4-rc.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,4 +9,5 @@ export interface ModuleAttributes {
9
9
  visible: boolean;
10
10
  container: 'row' | 'column';
11
11
  interactivity: Interactivity;
12
+ offerState: string;
12
13
  }
@@ -11,6 +11,7 @@ export interface AppSettings {
11
11
  childLayouts: PluginLayoutChild[];
12
12
  offerData: PluginOffer;
13
13
  pluginId: string;
14
+ offerState: unknown;
14
15
  }
15
16
  export interface IModuleConnector extends HTMLElement {
16
17
  getOfferPositionAttr(): number;
@@ -1,8 +1,3 @@
1
1
  export type GlobalOfferDataState = {
2
- [key: string]: {
3
- cart: Array<{
4
- cartItemId: string;
5
- quantity: number;
6
- }>;
7
- };
2
+ [key: string]: unknown;
8
3
  };
@@ -2,3 +2,6 @@ import { GlobalOfferDataState } from '../../models';
2
2
  export declare function getTotalCartQty(state: {
3
3
  globalOfferDataState: GlobalOfferDataState;
4
4
  }): number;
5
+ export declare function getOfferState(state: {
6
+ globalOfferDataState: GlobalOfferDataState;
7
+ }, position: number): unknown;
@@ -0,0 +1,8 @@
1
+ export type AppSettingsOfferState = {
2
+ cart: Array<AppSettingsCartItemState>;
3
+ };
4
+ export type AppSettingsCartItemState = {
5
+ cartItemId: string;
6
+ quantity: number;
7
+ };
8
+ export declare function isAppSettingsOfferState(offerState: unknown): offerState is AppSettingsOfferState;
@@ -1,2 +1,3 @@
1
1
  export * from './cart';
2
+ export * from './appSettingsOfferState';
2
3
  export * from './user-creative-response-history';
@@ -0,0 +1 @@
1
+ export * from './reducer';
@@ -1,4 +1,4 @@
1
1
  import { AnyAction } from '@reduxjs/toolkit';
2
- import { CartState } from '../../models';
3
- export declare function makeInitialCartState(): CartState;
2
+ import { CartState, AppSettingsCartItemState } from '../../models';
3
+ export declare function makeInitialCartState(cart: Array<AppSettingsCartItemState>): CartState;
4
4
  export declare function cartReducer(state: CartState | undefined, action: AnyAction): CartState;
@@ -18,3 +18,4 @@ export declare const appReducers: {
18
18
  childLayouts: typeof childLayoutsReducer;
19
19
  };
20
20
  export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
21
+ export * from './cart';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokt/dcui-orchestrator",
3
- "version": "0.0.4-rc.26",
3
+ "version": "0.0.4-rc.28",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",