@rokt/dcui-orchestrator 1.2.1-rc.32 → 1.2.1-rc.34

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.
Files changed (29) hide show
  1. package/dist/index.cjs +30 -30
  2. package/dist/index.js +35 -35
  3. package/dist/libraries/dcui-components/src/components/index.d.ts +2 -0
  4. package/dist/libraries/dcui-components/src/components/progress-control/index.d.ts +1 -0
  5. package/dist/libraries/dcui-components/src/components/progress-control/progress-control.d.ts +49 -0
  6. package/dist/libraries/dcui-components/src/components/progress-indicator/get-progress-indicator-state.d.ts +3 -0
  7. package/dist/libraries/dcui-components/src/components/progress-indicator/index.d.ts +3 -0
  8. package/dist/libraries/dcui-components/src/components/progress-indicator/progress-indicator.d.ts +8 -0
  9. package/dist/libraries/dcui-components/src/components/progress-indicator/types.d.ts +88 -0
  10. package/dist/libraries/domain/src/behaviors/continuous-child.d.ts +11 -8
  11. package/dist/libraries/domain/src/models/child-layout-response.d.ts +3 -1
  12. package/dist/libraries/module-connector/src/models/module-attributes.d.ts +3 -0
  13. package/dist/libraries/module-connector/src/models/module-connector-builder.d.ts +1 -0
  14. package/dist/libraries/orchestrator/src/components/progress-control/progress-control.d.ts +2 -45
  15. package/dist/libraries/orchestrator/src/components/progress-indicator/progress-indicator.d.ts +1 -9
  16. package/dist/libraries/orchestrator/src/components/progress-indicator/types.d.ts +1 -87
  17. package/dist/libraries/orchestrator/src/measurement/creative-measurement.d.ts +54 -0
  18. package/dist/libraries/orchestrator/src/sagas/child-layouts/continuous-child-host.d.ts +1 -1
  19. package/dist/libraries/orchestrator/src/sagas/child-layouts/continuous-child.d.ts +1 -1
  20. package/node_modules/@rokt/dcui-layout-schema/dist/schema.d.ts +96 -14
  21. package/node_modules/@rokt/dcui-layout-schema/dist/tsconfig.tsbuildinfo +1 -1
  22. package/node_modules/@rokt/dcui-layout-schema/package.json +1 -1
  23. package/node_modules/@rokt/dcui-layout-schema/v1.27/index.d.ts +7577 -0
  24. package/node_modules/@rokt/dcui-layout-schema/v1.27/index.js +4 -0
  25. package/node_modules/@rokt/dcui-layout-schema/v1.28/index.d.ts +7628 -0
  26. package/node_modules/@rokt/dcui-layout-schema/v1.28/index.js +4 -0
  27. package/node_modules/@rokt/dcui-layout-schema/v1.29/index.d.ts +7643 -0
  28. package/node_modules/@rokt/dcui-layout-schema/v1.29/index.js +4 -0
  29. package/package.json +2 -2
@@ -32,3 +32,5 @@ export * from './text-input';
32
32
  export * from './action-button';
33
33
  export * from './apple-pay-button';
34
34
  export * from './paypal-button';
35
+ export * from './progress-indicator';
36
+ export * from './progress-control';
@@ -0,0 +1 @@
1
+ export * from './progress-control';
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import { ProgressControlModel, NonInteractableChildren, WhenPredicate } from '@rokt/dcui-layout-schema';
3
+ export interface ProgressControlProps {
4
+ /**
5
+ * - `a11yLabel`: the aria-label for the button
6
+ * - `direction`: 'Forward' | 'Backward'.
7
+ * - `children`: it can accept below nodes,
8
+ * * `Row`
9
+ * * `Column`
10
+ * * `ZStack`
11
+ * * `BasicText`
12
+ * * `StaticImage`
13
+ * * `When`
14
+ * * `InlineContainer`
15
+ * - `styles`:
16
+ * * `elements`:
17
+ * * `own`:
18
+ * - `container`
19
+ * - `background`
20
+ * - `border`
21
+ * - `dimension`
22
+ * - `flexChild`
23
+ * - `spacing`
24
+ * * `transitions`:
25
+ * - `type`: 'Conditional'
26
+ * - `transition`:
27
+ * * `predicates`: WhenPredicate[]
28
+ * * `duration`: number
29
+ * * `value`:
30
+ * * `own`:
31
+ * - `container`
32
+ * - `background`
33
+ * - `border`
34
+ * - `dimension`
35
+ * - `flexChild`
36
+ * - `spacing`
37
+ */
38
+ schema: ProgressControlModel<NonInteractableChildren, WhenPredicate>;
39
+ testId?: string;
40
+ onClick: () => void;
41
+ /** Additional navigation boundary imposed by the owning renderer. */
42
+ disabled?: boolean;
43
+ }
44
+ /**The ProgressControl is a progress node that facilitates navigation
45
+ * through sequential steps or stages of a process or content.<br>
46
+ * It offers users the ability to move both forward and backward
47
+ * within a linear progression, allowing them to review and control their journey.<br>
48
+ * */
49
+ export declare function ProgressControl(props: ProgressControlProps): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ProgressIndicatorStateProps } from './types';
2
+ /** Resolve the schema's one-based (or end-relative) start position. */
3
+ export declare function getProgressIndicatorState(numberOfGroups: number, activeIndex: number, startPosition?: number | null): ProgressIndicatorStateProps;
@@ -0,0 +1,3 @@
1
+ export * from './progress-indicator';
2
+ export * from './types';
3
+ export * from './get-progress-indicator-state';
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { ProgressIndicatorProps } from './types';
3
+ /** The ProgressIndicator is a progress node that provides users with real-time
4
+ * feedback on the status of ongoing processes or actions.<br>
5
+ * It's a visual representation of progress, often displayed as a bar,
6
+ * circle, or numerical percentage.<br>
7
+ * */
8
+ export declare function ProgressIndicator({ activeIndex, startIndex, numOfIndicators, schema, ariaLabel, }: ProgressIndicatorProps): React.JSX.Element | null;
@@ -0,0 +1,88 @@
1
+ import { ProgressIndicatorModel, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ export interface ProgressIndicatorStateProps {
3
+ /** The number of indicators */
4
+ numOfIndicators: number;
5
+ /** The currently active index. */
6
+ activeIndex: number;
7
+ /** The index of the indicator to start displaying from **/
8
+ startIndex: number;
9
+ }
10
+ export interface ProgressIndicatorSchemaProps {
11
+ /**
12
+ * - `indicator`: The string content of the indicator.
13
+ * - `styles`:
14
+ * * `elements`:
15
+ * * `own`:
16
+ * - `container`
17
+ * - `background`
18
+ * - `border`
19
+ * - `dimension`
20
+ * - `flexChild`
21
+ * - `spacing`
22
+ * * `indicator`:
23
+ * - `container`
24
+ * - `background`
25
+ * - `border`
26
+ * - `dimension`
27
+ * - `flexChild`
28
+ * - `spacing`
29
+ * - `text`
30
+ * * `activeIndicator`:
31
+ * - `container`
32
+ * - `background`
33
+ * - `border`
34
+ * - `dimension`
35
+ * - `flexChild`
36
+ * - `spacing`
37
+ * - `text`
38
+ * * `seenIndicator`:
39
+ * - `container`
40
+ * - `background`
41
+ * - `border`
42
+ * - `dimension`
43
+ * - `flexChild`
44
+ * - `spacing`
45
+ * - `text`
46
+ * * `transitions`:
47
+ * - `type`: 'Conditional'
48
+ * - `transition`:
49
+ * * `predicates`: WhenPredicate[]
50
+ * * `duration`: number
51
+ * * `value`:
52
+ * * `own`:
53
+ * - `container`
54
+ * - `background`
55
+ * - `border`
56
+ * - `dimension`
57
+ * - `flexChild`
58
+ * - `spacing`
59
+ * * `indicator`:
60
+ * - `container`
61
+ * - `background`
62
+ * - `border`
63
+ * - `dimension`
64
+ * - `flexChild`
65
+ * - `spacing`
66
+ * - `text`
67
+ * * `activeIndicator`:
68
+ * - `container`
69
+ * - `background`
70
+ * - `border`
71
+ * - `dimension`
72
+ * - `flexChild`
73
+ * - `spacing`
74
+ * - `text`
75
+ * * `seenIndicator`:
76
+ * - `container`
77
+ * - `background`
78
+ * - `border`
79
+ * - `dimension`
80
+ * - `flexChild`
81
+ * - `spacing`
82
+ * - `text`
83
+ */
84
+ schema: ProgressIndicatorModel<WhenPredicate>;
85
+ }
86
+ export interface ProgressIndicatorProps extends ProgressIndicatorSchemaProps, ProgressIndicatorStateProps {
87
+ ariaLabel?: string;
88
+ }
@@ -1,7 +1,8 @@
1
1
  import { LinkOpenTarget } from '@rokt/dcui-layout-schema';
2
2
  import { PluginChildLayoutModel } from '../models';
3
- /** Deliberately off until measurement and the SDK persistence proof are approved. */
4
- export declare const CONTINUOUS_CHILD_CAPABILITY_ENABLED = false;
3
+ /** Plugin builds support explicit continuationKey opt-in; standalone consumers stay off. */
4
+ export declare function isContinuousChildEnabled(environment: string | undefined): boolean;
5
+ export declare const CONTINUOUS_CHILD_CAPABILITY_ENABLED: boolean;
5
6
  export declare const CONTINUOUS_CHILD_VERSION = 1;
6
7
  export declare const CONTINUOUS_CHILD_EVENTS: {
7
8
  readonly READY: "CONTINUOUS_CHILD/READY";
@@ -10,17 +11,15 @@ export declare const CONTINUOUS_CHILD_EVENTS: {
10
11
  readonly REQUEST: "CONTINUOUS_CHILD/REQUEST";
11
12
  readonly EXPOSURE: "CONTINUOUS_CHILD/EXPOSURE";
12
13
  };
13
- /** Temporary additive types until the stable schema package is published. */
14
- export type ContinuousChildSchema = PluginChildLayoutModel['childLayoutSchema'] & {
15
- continuationKey?: string | null;
16
- ownsViewability?: boolean | null;
17
- };
14
+ /** Generated Web 1.30 child schema contract. */
15
+ export type ContinuousChildSchema = PluginChildLayoutModel['childLayoutSchema'];
18
16
  export interface ContinuousIdentity {
19
17
  sessionId: string;
20
18
  revision: number;
21
19
  position: number;
22
20
  creativeInstanceGuid: string;
23
- childInstanceGuid: string;
21
+ /** Optional serving tracking metadata; session/revision and creative identity remain required. */
22
+ childInstanceGuid?: string;
24
23
  }
25
24
  export interface ContinuousPresentationInput {
26
25
  config: PluginChildLayoutModel;
@@ -35,6 +34,10 @@ export interface ContinuousRequest {
35
34
  identity: ContinuousIdentity;
36
35
  actionId: string;
37
36
  openLinks?: LinkOpenTarget;
37
+ dismissalMethod?: string;
38
+ inferredView?: {
39
+ supportedByBrowser: boolean;
40
+ };
38
41
  action: 'next' | 'previous' | 'positive' | 'negative' | 'close';
39
42
  }
40
43
  export interface ContinuousExposure {
@@ -1,4 +1,6 @@
1
1
  import { PluginOffer } from './plugin/plugin-offer';
2
- import { PluginCreativeUrlResponseOption } from './plugin/plugin-creative-response-option';
2
+ import { PluginCreativeCaptureOnlyResponseOption, PluginCreativeUrlResponseOption } from './plugin/plugin-creative-response-option';
3
3
  /** Child acceptance supports ordinary positive URLs, not deferred fulfillment. */
4
4
  export declare function getChildPositiveResponse(offer: PluginOffer | null, responseKey: string): PluginCreativeUrlResponseOption | undefined;
5
+ /** Persistent children dispatch ordinary responses through the current parent module. */
6
+ export declare function getContinuousChildResponse(offer: PluginOffer | null, responseKey: 'positive' | 'negative'): PluginCreativeUrlResponseOption | PluginCreativeCaptureOnlyResponseOption | undefined;
@@ -7,6 +7,9 @@ export interface ModuleAttributes {
7
7
  childLayouts: string;
8
8
  schemaVersion: string;
9
9
  visible: 'true' | 'false';
10
+ 'continuous-measurement'?: string;
11
+ 'expanded-owns-viewability'?: string;
12
+ 'measurement-occluded'?: string;
10
13
  container: 'row' | 'column';
11
14
  interactivity: Interactivity;
12
15
  offerState: string;
@@ -19,6 +19,7 @@ export interface IModuleConnector extends HTMLElement {
19
19
  getOfferPositionAttr(): number;
20
20
  getJSONAttr<Result>(att: string, defaultValue?: string): Result;
21
21
  connectedCallback(): void;
22
+ disconnectedCallback(): void;
22
23
  }
23
24
  export declare class ModuleConnectorBuilder {
24
25
  logger: (log: Log) => void;
@@ -1,47 +1,4 @@
1
1
  import React from 'react';
2
- import { ProgressControlModel, NonInteractableChildren, WhenPredicate } from '@rokt/dcui-layout-schema';
3
- export interface ProgressControlProps {
4
- /**
5
- * - `a11yLabel`: the aria-label for the button
6
- * - `direction`: 'Forward' | 'Backward'.
7
- * - `children`: it can accept below nodes,
8
- * * `Row`
9
- * * `Column`
10
- * * `ZStack`
11
- * * `BasicText`
12
- * * `StaticImage`
13
- * * `When`
14
- * * `InlineContainer`
15
- * - `styles`:
16
- * * `elements`:
17
- * * `own`:
18
- * - `container`
19
- * - `background`
20
- * - `border`
21
- * - `dimension`
22
- * - `flexChild`
23
- * - `spacing`
24
- * * `transitions`:
25
- * - `type`: 'Conditional'
26
- * - `transition`:
27
- * * `predicates`: WhenPredicate[]
28
- * * `duration`: number
29
- * * `value`:
30
- * * `own`:
31
- * - `container`
32
- * - `background`
33
- * - `border`
34
- * - `dimension`
35
- * - `flexChild`
36
- * - `spacing`
37
- */
38
- schema: ProgressControlModel<NonInteractableChildren, WhenPredicate>;
39
- testId?: string;
40
- }
41
- /**The ProgressControl is a progress node that facilitates navigation
42
- * through sequential steps or stages of a process or content.<br>
43
- * It offers users the ability to move both forward and backward
44
- * within a linear progression, allowing them to review and control their journey.<br>
45
- * *Where can we use this: __outer layout__*
46
- * */
2
+ import { ProgressControlProps as SharedProgressControlProps } from '../../../../dcui-components/src/index';
3
+ export type ProgressControlProps = Omit<SharedProgressControlProps, 'onClick' | 'disabled'>;
47
4
  export declare function ProgressControl(props: ProgressControlProps): React.JSX.Element;
@@ -1,9 +1 @@
1
- import * as React from 'react';
2
- import { ProgressIndicatorProps } from './types';
3
- /** The ProgressIndicator is a progress node that provides users with real-time
4
- * feedback on the status of ongoing processes or actions.<br>
5
- * It's a visual representation of progress, often displayed as a bar,
6
- * circle, or numerical percentage.<br>
7
- * *Where can we use this: __outer layout__*
8
- * */
9
- export declare function ProgressIndicator({ activeIndex, startIndex, numOfIndicators, schema, }: ProgressIndicatorProps): React.JSX.Element | null;
1
+ export { ProgressIndicator } from '../../../../dcui-components/src/index';
@@ -1,87 +1 @@
1
- import { ProgressIndicatorModel, WhenPredicate } from '@rokt/dcui-layout-schema';
2
- export interface StateProps {
3
- /** The number of indicators */
4
- numOfIndicators: number;
5
- /** The currently active index. */
6
- activeIndex: number;
7
- /** The index of the indicator to start displaying from **/
8
- startIndex: number;
9
- }
10
- export interface OwnProps {
11
- /**
12
- * - `indicator`: The string content of the indicator.
13
- * - `styles`:
14
- * * `elements`:
15
- * * `own`:
16
- * - `container`
17
- * - `background`
18
- * - `border`
19
- * - `dimension`
20
- * - `flexChild`
21
- * - `spacing`
22
- * * `indicator`:
23
- * - `container`
24
- * - `background`
25
- * - `border`
26
- * - `dimension`
27
- * - `flexChild`
28
- * - `spacing`
29
- * - `text`
30
- * * `activeIndicator`:
31
- * - `container`
32
- * - `background`
33
- * - `border`
34
- * - `dimension`
35
- * - `flexChild`
36
- * - `spacing`
37
- * - `text`
38
- * * `seenIndicator`:
39
- * - `container`
40
- * - `background`
41
- * - `border`
42
- * - `dimension`
43
- * - `flexChild`
44
- * - `spacing`
45
- * - `text`
46
- * * `transitions`:
47
- * - `type`: 'Conditional'
48
- * - `transition`:
49
- * * `predicates`: WhenPredicate[]
50
- * * `duration`: number
51
- * * `value`:
52
- * * `own`:
53
- * - `container`
54
- * - `background`
55
- * - `border`
56
- * - `dimension`
57
- * - `flexChild`
58
- * - `spacing`
59
- * * `indicator`:
60
- * - `container`
61
- * - `background`
62
- * - `border`
63
- * - `dimension`
64
- * - `flexChild`
65
- * - `spacing`
66
- * - `text`
67
- * * `activeIndicator`:
68
- * - `container`
69
- * - `background`
70
- * - `border`
71
- * - `dimension`
72
- * - `flexChild`
73
- * - `spacing`
74
- * - `text`
75
- * * `seenIndicator`:
76
- * - `container`
77
- * - `background`
78
- * - `border`
79
- * - `dimension`
80
- * - `flexChild`
81
- * - `spacing`
82
- * - `text`
83
- */
84
- schema: ProgressIndicatorModel<WhenPredicate>;
85
- }
86
- export interface ProgressIndicatorProps extends OwnProps, StateProps {
87
- }
1
+ export type { ProgressIndicatorProps, ProgressIndicatorStateProps as StateProps, ProgressIndicatorSchemaProps as OwnProps, } from '../../../../dcui-components/src/index';
@@ -0,0 +1,54 @@
1
+ import { RaiseSignal } from '../../../domain/src/behaviors';
2
+ import { Impression, Viewed } from '../../../domain/src/models';
3
+ export interface CreativeIdentity {
4
+ creativeInstanceGuid: string;
5
+ offerPositionIndex: number;
6
+ }
7
+ export interface PresentationIdentity extends CreativeIdentity {
8
+ sessionId: string;
9
+ revision: number;
10
+ }
11
+ export type Qualification = Pick<Viewed, 'supportedByBrowser' | 'inferred'>;
12
+ type MeasurementStore = {
13
+ dispatch(action: RaiseSignal): void;
14
+ };
15
+ /** One registry per parent store/selection, never one per child session. */
16
+ export declare function getContinuousMeasurement(store: MeasurementStore): CreativeMeasurement;
17
+ /**
18
+ * Parent-owned creative signals. Layout/slot signals deliberately bypass this
19
+ * ledger. Registration is explicit: the disabled capability and ordinary layouts
20
+ * must never change their existing measurement just because a child exists.
21
+ */
22
+ export declare class CreativeMeasurement {
23
+ private readonly emit;
24
+ private readonly creatives;
25
+ private readonly presentations;
26
+ private sessionId;
27
+ private highestRevision;
28
+ private occluded;
29
+ private readonly listeners;
30
+ constructor(emit: (action: RaiseSignal) => void);
31
+ /** A new served selection is a new lifetime; reopening the child is not. */
32
+ resetSelection(): void;
33
+ registerCreative(identity: CreativeIdentity, ownsViewability: boolean): void;
34
+ getEmbeddedPolicy(identity: CreativeIdentity): {
35
+ registered: boolean;
36
+ ownsViewability: boolean;
37
+ occluded: boolean;
38
+ };
39
+ subscribe(listener: () => void): () => void;
40
+ setOccluded(occluded: boolean): void;
41
+ /** Consumes only opted-in CREATIVE signals; false means use the legacy path. */
42
+ reportEmbedded(identity: CreativeIdentity, signal: Impression | Viewed): boolean;
43
+ /** Called after the child applied the snapshot, not when it was configured. */
44
+ acknowledge(identity: PresentationIdentity): boolean;
45
+ beginSession(sessionId: string): void;
46
+ endSession(): void;
47
+ reportExpanded(identity: PresentationIdentity, qualification?: Qualification): boolean;
48
+ private getCreative;
49
+ private matchesAcknowledged;
50
+ private render;
51
+ private qualify;
52
+ private notify;
53
+ }
54
+ export {};
@@ -8,7 +8,7 @@ export declare function isContinuousEngagement(action: unknown): boolean;
8
8
  export declare function makeContinuousChildHost(store: Pick<AppStore, 'getState' | 'dispatch' | 'subscribe'>, service: PluginService, enabled?: boolean): {
9
9
  gateway: ContinuousGatewayService | undefined;
10
10
  coordinator: ContinuousChildCoordinator;
11
- getSequence: (key: string) => ContinuousPresentationInput[] | undefined;
11
+ getSequence: (key: string, onRejected?: (reason: string) => void) => ContinuousPresentationInput[] | undefined;
12
12
  transformAction(action: unknown): unknown;
13
13
  observeAction(action: unknown): void;
14
14
  close(): Promise<void>;
@@ -16,7 +16,7 @@ export interface ContinuousChildDependencies {
16
16
  getActivePosition(): number;
17
17
  navigate(position: number): void;
18
18
  respond(position: number, key: 'positive' | 'negative', openLinks?: LinkOpenTarget): Promise<void>;
19
- dismiss(position: number): Promise<void>;
19
+ dismiss(position: number, dismissalMethod?: string): Promise<void>;
20
20
  onApplied?(presentation: ContinuousPresentation): void;
21
21
  onExposure?(presentation: ContinuousPresentation, report: ContinuousExposure): void;
22
22
  onOcclusion?(occluded: boolean): void;