@rokt/dcui-orchestrator 1.2.1-rc.3 → 1.2.1-rc.4

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.
@@ -5,9 +5,13 @@ export type DataObject = {
5
5
  export type StateOnlyObject = {
6
6
  state: object;
7
7
  };
8
+ export type AttributeOnlyObject = {
9
+ attribute: object;
10
+ };
8
11
  export type ExtendableDataMapper = ReturnType<typeof createDataMapper>;
9
12
  export declare function createDataMapper(data: object, namespace?: string): {
10
13
  (template: string): string;
11
14
  (stateObj: StateOnlyObject, namespace?: string): /*elided*/ any;
15
+ (attributeObj: AttributeOnlyObject, namespace?: string): /*elided*/ any;
12
16
  (dataObj: DataObject, namespace: string): /*elided*/ any;
13
17
  };
@@ -1,20 +1,24 @@
1
1
  export declare const DataMapperContext: import("react").Context<{
2
2
  (template: string): string;
3
3
  (stateObj: import("..").StateOnlyObject, namespace?: string): /*elided*/ any;
4
+ (attributeObj: import("..").AttributeOnlyObject, namespace?: string): /*elided*/ any;
4
5
  (dataObj: import("..").DataObject, namespace: string): /*elided*/ any;
5
6
  }>;
6
7
  export declare const DataMapperConsumer: import("react").Consumer<{
7
8
  (template: string): string;
8
9
  (stateObj: import("..").StateOnlyObject, namespace?: string): /*elided*/ any;
10
+ (attributeObj: import("..").AttributeOnlyObject, namespace?: string): /*elided*/ any;
9
11
  (dataObj: import("..").DataObject, namespace: string): /*elided*/ any;
10
12
  }>;
11
13
  export declare const DataMapperProvider: import("react").Provider<{
12
14
  (template: string): string;
13
15
  (stateObj: import("..").StateOnlyObject, namespace?: string): /*elided*/ any;
16
+ (attributeObj: import("..").AttributeOnlyObject, namespace?: string): /*elided*/ any;
14
17
  (dataObj: import("..").DataObject, namespace: string): /*elided*/ any;
15
18
  }>;
16
19
  export declare const useDataMapper: () => {
17
20
  (template: string): string;
18
21
  (stateObj: import("..").StateOnlyObject, namespace?: string): /*elided*/ any;
22
+ (attributeObj: import("..").AttributeOnlyObject, namespace?: string): /*elided*/ any;
19
23
  (dataObj: import("..").DataObject, namespace: string): /*elided*/ any;
20
24
  };
@@ -0,0 +1,7 @@
1
+ import { AttributesState } from '../models';
2
+ export declare const SET_ATTRIBUTES = "ATTRIBUTES/SET";
3
+ export type SetAttributesAction = {
4
+ type: typeof SET_ATTRIBUTES;
5
+ payload: AttributesState;
6
+ };
7
+ export type AttributesActions = SetAttributesAction;
@@ -1,6 +1,7 @@
1
1
  import { OpenLink, PrepareSignal, RaiseMetric, RaiseSignal, SendPartner, SetDomainState } from '../../../domain/src/behaviors';
2
2
  import { ActiveStateActions } from './active';
3
3
  import { BreakpointActions, SetBreakpoints } from './breakpoint';
4
+ import { AttributesActions } from './attributes';
4
5
  import { FontsActions } from './fonts';
5
6
  import { LayoutActions } from './layout';
6
7
  import { ClosePlugin } from './plugin';
@@ -25,16 +26,18 @@ export * from './error';
25
26
  export * from './log';
26
27
  export * from './overlay';
27
28
  export * from './plugin';
29
+ export * from './attributes';
28
30
  export * from './custom-states';
29
31
  export * from './domain-states';
30
32
  export * from './form-states';
31
- export type CoreStateActions = LayoutActions | BreakpointActions | ActiveStateActions | FontsActions | SignalStateActions | SerializableCacheActions | SettingsActions | CustomStatesActions | SetDomainStateReducer | LayoutEventAction | FormStatesActions;
33
+ export type CoreStateActions = LayoutActions | BreakpointActions | ActiveStateActions | AttributesActions | FontsActions | SignalStateActions | SerializableCacheActions | SettingsActions | CustomStatesActions | SetDomainStateReducer | LayoutEventAction | FormStatesActions;
32
34
  export declare const coreStateActionTypes: {
33
35
  readonly LAYOUT_UPDATE: "LAYOUT/UPDATE";
34
36
  readonly UPDATE_ACTIVE_BREAKPOINT: "BREAKPOINT/UPDATE_ACTIVE";
35
37
  readonly INITIALISE_BREAKPOINT: "BREAKPOINT/INITIALISE";
36
38
  readonly ACTIVE_ADD: "ACTIVE/ADD";
37
39
  readonly ACTIVE_DELETE: "ACTIVE/DELETE";
40
+ readonly SET_ATTRIBUTES: "ATTRIBUTES/SET";
38
41
  readonly SET_FONTS: "FONTS/SET";
39
42
  readonly QUEUE_SIGNAL: "SIGNAL/QUEUE";
40
43
  readonly SIGNAL_PROCESSED: "SIGNAL/PROCESSED";
@@ -0,0 +1,2 @@
1
+ import { NormalizedAttributes } from '@rokt/plugin/interface/attributes';
2
+ export type AttributesState = NormalizedAttributes;
@@ -1,4 +1,5 @@
1
1
  import { ActiveState } from './active';
2
+ import { AttributesState } from './attributes';
2
3
  import { BreakpointState } from './breakpoint';
3
4
  import { FontsState } from './fonts';
4
5
  import { LayoutState } from './layout';
@@ -9,6 +10,7 @@ import { CustomStatesIndexState } from './custom-states';
9
10
  import { FiredEventsIndexState } from './fired-events';
10
11
  import { FormStatesIndexState } from './form-states';
11
12
  export * from './active';
13
+ export * from './attributes';
12
14
  export * from './breakpoint';
13
15
  export * from './fonts';
14
16
  export * from './layout';
@@ -22,6 +24,7 @@ export type CoreAppState = {
22
24
  layout: LayoutState;
23
25
  breakpoint: BreakpointState;
24
26
  active: ActiveState;
27
+ attributes: AttributesState;
25
28
  fonts: FontsState;
26
29
  signal: SignalState;
27
30
  serializableCache: SerializableCacheState;
@@ -0,0 +1 @@
1
+ export * from './reducer';
@@ -0,0 +1,4 @@
1
+ import { AnyAction } from '@reduxjs/toolkit';
2
+ import { AttributesState } from '../../models';
3
+ export declare function makeInitialAttributesState(): AttributesState;
4
+ export declare function attributesReducer(state: AttributesState | undefined, action: AnyAction): AttributesState;
@@ -2,6 +2,7 @@ import { CoreAppState } from '../models';
2
2
  import { breakpointReducer } from './breakpoint';
3
3
  import { layoutReducer } from './layout';
4
4
  import { activeReducer } from './active';
5
+ import { attributesReducer } from './attributes';
5
6
  import { fontsReducer } from './fonts';
6
7
  import { signalReducer } from './signal';
7
8
  import { serializableCacheReducer } from './serializable-cache';
@@ -12,6 +13,7 @@ import { formStatesReducer } from './form-states';
12
13
  export * from './breakpoint';
13
14
  export * from './layout';
14
15
  export * from './active';
16
+ export * from './attributes';
15
17
  export * from './fonts';
16
18
  export * from './signal';
17
19
  export * from './serializable-cache';
@@ -23,6 +25,7 @@ export declare const coreAppReducers: {
23
25
  layout: typeof layoutReducer;
24
26
  breakpoint: typeof breakpointReducer;
25
27
  active: typeof activeReducer;
28
+ attributes: typeof attributesReducer;
26
29
  fonts: typeof fontsReducer;
27
30
  signal: typeof signalReducer;
28
31
  serializableCache: typeof serializableCacheReducer;
@@ -1,5 +1,5 @@
1
1
  import { EventChannel } from 'redux-saga';
2
2
  import { ThemeInterface } from '@rokt/plugin';
3
- import { ConfigService } from '../../../../plugin-utils/src/index';
4
- import { HandleConfigAction, SetFontsAction } from '../../actions';
5
- export declare function makeWsdkChannel<LayoutModelType, PluginModelType>(configService: ConfigService<LayoutModelType>, themeService: ThemeInterface, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): EventChannel<HandleConfigAction<PluginModelType> | SetFontsAction>;
3
+ import { AttributesService, ConfigService } from '../../../../plugin-utils/src/index';
4
+ import { HandleConfigAction, SetAttributesAction, SetFontsAction } from '../../actions';
5
+ export declare function makeWsdkChannel<LayoutModelType, PluginModelType>(configService: ConfigService<LayoutModelType>, themeService: ThemeInterface, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined, attributesService?: AttributesService): EventChannel<HandleConfigAction<PluginModelType> | SetFontsAction | SetAttributesAction>;
@@ -5,7 +5,7 @@ import { ContextService, DisplayService, PluginService } from '../../../../plugi
5
5
  import { HandleConfigAction, ReportError } from '../../actions';
6
6
  import { EventChannel } from 'redux-saga';
7
7
  export declare function closePlugin(contextService: ContextService): Generator<RaceEffect<CallEffect | Generator<SelectEffect | CallEffect, void, boolean>> | SelectEffect | CallEffect | Generator<SelectEffect | CallEffect, void, boolean> | PutEffect<ReportError>, void, boolean>;
8
- export declare function listenToWsdkChannel<LayoutModelType, PluginModelType>(pluginService: PluginService<LayoutModelType>, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): Generator<PutEffect<ReportError> | CallEffect<EventChannel<import("../../../../orchestrator/src/actions").SetFontsAction | HandleConfigAction<PluginModelType>>> | import("redux-saga/effects").ChannelTakeEffect<HandleConfigAction<PluginModelType>> | PutEffect<HandleConfigAction<PluginModelType>>, void, EventChannel<HandleConfigAction<PluginModelType>> & HandleConfigAction<PluginModelType>>;
8
+ export declare function listenToWsdkChannel<LayoutModelType, PluginModelType>(pluginService: PluginService<LayoutModelType>, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): Generator<PutEffect<ReportError> | CallEffect<EventChannel<import("../../../../orchestrator/src/actions").SetAttributesAction | import("../../../../orchestrator/src/actions").SetFontsAction | HandleConfigAction<PluginModelType>>> | import("redux-saga/effects").ChannelTakeEffect<HandleConfigAction<PluginModelType>> | PutEffect<HandleConfigAction<PluginModelType>>, void, EventChannel<HandleConfigAction<PluginModelType>> & HandleConfigAction<PluginModelType>>;
9
9
  export declare function wsdkSagas<LayoutModelType, PluginModelType>(pluginService: PluginService<LayoutModelType>, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void>>, void, unknown>;
10
10
  export declare function displayPlugin(displayService: DisplayService, preset?: LayoutDisplayPreset | null, controls?: FrameControls | null): Generator<CallEffect<void> | import("redux-saga/effects").ForkEffect<void> | PutEffect<{
11
11
  type: "ACTIVE/ADD";
@@ -36,6 +36,7 @@ export declare const stateActionTypes: {
36
36
  readonly INITIALISE_BREAKPOINT: "BREAKPOINT/INITIALISE";
37
37
  readonly ACTIVE_ADD: "ACTIVE/ADD";
38
38
  readonly ACTIVE_DELETE: "ACTIVE/DELETE";
39
+ readonly SET_ATTRIBUTES: "ATTRIBUTES/SET";
39
40
  readonly SET_FONTS: "FONTS/SET";
40
41
  readonly QUEUE_SIGNAL: "SIGNAL/QUEUE";
41
42
  readonly SIGNAL_PROCESSED: "SIGNAL/PROCESSED";
@@ -14,6 +14,7 @@ export declare const appReducers: {
14
14
  layout: typeof import("../../../layout-renderer-utils/src/index").layoutReducer;
15
15
  breakpoint: typeof import("../../../layout-renderer-utils/src/index").breakpointReducer;
16
16
  active: typeof import("../../../layout-renderer-utils/src/index").activeReducer;
17
+ attributes: typeof import("../../../layout-renderer-utils/src/index").attributesReducer;
17
18
  fonts: typeof import("../../../layout-renderer-utils/src/index").fontsReducer;
18
19
  signal: typeof import("../../../layout-renderer-utils/src/index").signalReducer;
19
20
  serializableCache: typeof import("../../../layout-renderer-utils/src/index").serializableCacheReducer;
@@ -0,0 +1,7 @@
1
+ import { PluginInterface } from '@rokt/plugin';
2
+ import { NormalizedAttributes } from '@rokt/plugin/interface/attributes';
3
+ import { Callback, Unsubscriber } from '@rokt/plugin/interface/subscriber';
4
+ export type AttributesService = {
5
+ subscribe(value?: Callback<[NormalizedAttributes]>, error?: Callback, complete?: Callback): Unsubscriber;
6
+ };
7
+ export declare const makeAttributesService: (pluginInterface: Pick<PluginInterface, "attributes">) => AttributesService;
@@ -1,4 +1,5 @@
1
1
  import { ErrorInterface, PluginInterface, RDNInterface, ThemeInterface } from '@rokt/plugin';
2
+ import { AttributesService } from './attributes';
2
3
  import { ContextService } from './context';
3
4
  import { MetricsService } from './metrics';
4
5
  import { DisplayService } from './display';
@@ -6,8 +7,9 @@ import { PartnerInteractionService } from './partner-interaction';
6
7
  import { ParentInteractionService } from './parent-interaction';
7
8
  import { ConfigService } from './config';
8
9
  import { ChildPluginService } from './child-plugin';
9
- export { ContextService, MetricsService, DisplayService, PartnerInteractionService, ParentInteractionService, ConfigService, ChildPluginService, };
10
+ export { AttributesService, ContextService, MetricsService, DisplayService, PartnerInteractionService, ParentInteractionService, ConfigService, ChildPluginService, };
10
11
  export interface PluginService<T> {
12
+ attributesService: AttributesService;
11
13
  contextService: ContextService;
12
14
  configService: ConfigService<T>;
13
15
  partnerInteractionService: PartnerInteractionService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokt/dcui-orchestrator",
3
- "version": "1.2.1-rc.3",
3
+ "version": "1.2.1-rc.4",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",