@rokt/dcui-orchestrator 1.2.1-rc.49 → 1.2.1-rc.50
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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/libraries/orchestrator/src/sagas/progression/sagas.d.ts +8 -2
- package/dist/libraries/orchestrator/src/sagas/utils/distribution.d.ts +7 -0
- package/dist/libraries/orchestrator/src/sagas/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { CallEffect, PutEffect, SelectEffect, TakeEffect } from 'redux-saga/effects';
|
|
2
|
-
import { ProcessProgression, StateActions, UpdateActiveBreakpointAction } from '../../actions';
|
|
2
|
+
import { InitialiseBreakpointAction, ProcessProgression, StateActions, UpdateActiveBreakpointAction } from '../../actions';
|
|
3
3
|
import { CloseOnNegativeResponsePolicy } from '@rokt/dcui-layout-schema';
|
|
4
4
|
type ProgressResult = {
|
|
5
5
|
exists: boolean;
|
|
6
6
|
isLastOffer: boolean;
|
|
7
7
|
};
|
|
8
8
|
type NextValues = ProgressResult | boolean | number | CloseOnNegativeResponsePolicy | undefined;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Sends the group size for the breakpoint the action names, on the first
|
|
11
|
+
* breakpoint read (INITIALISE_BREAKPOINT) and on every later change
|
|
12
|
+
* (UPDATE_ACTIVE_BREAKPOINT). The first read names no breakpoint when the
|
|
13
|
+
* channel reports none, and the reducer reads that as the default one.
|
|
14
|
+
*/
|
|
15
|
+
export declare function updateGroupSize(action: UpdateActiveBreakpointAction | InitialiseBreakpointAction): Generator<SelectEffect | PutEffect<StateActions>, void, Array<number> | undefined>;
|
|
10
16
|
export declare function processProgress(action: ProcessProgression): Generator<SelectEffect | CallEffect | PutEffect | TakeEffect, void, NextValues>;
|
|
11
17
|
export {};
|
|
@@ -28,3 +28,10 @@ export declare function normaliseGroupSize(value: number | undefined): number;
|
|
|
28
28
|
* missing entry is a layout that names no group size, not a changed one.
|
|
29
29
|
*/
|
|
30
30
|
export declare function isGroupSizeChanged(value: number | undefined): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* A normalised group size capped at the number of offers the placement
|
|
33
|
+
* holds: the reducer refuses a group larger than the placement, so one offer
|
|
34
|
+
* with viewableItems [2] at a breakpoint keeps a group of 1 instead of a
|
|
35
|
+
* null progression.
|
|
36
|
+
*/
|
|
37
|
+
export declare function capGroupSize(groupSize: number, slotSize: number): number;
|
|
@@ -5,5 +5,6 @@ declare const _default: {
|
|
|
5
5
|
getDistributionViewableItems(distribution: distributionUtils.Distribution | undefined): Array<number> | undefined;
|
|
6
6
|
normaliseGroupSize(value: number | undefined): number;
|
|
7
7
|
isGroupSizeChanged(value: number | undefined): boolean;
|
|
8
|
+
capGroupSize(groupSize: number, slotSize: number): number;
|
|
8
9
|
};
|
|
9
10
|
export default _default;
|