@juo/orion-core 0.17.0 → 0.17.1
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/{ExtensionRoot-Cy6c9p75.js → ExtensionRoot-BifGkf1W.js} +1 -1
- package/dist/core.js +1 -1
- package/dist/flows/WorkflowService.d.ts +2 -0
- package/dist/{juo-workflow-ComG9rLp.js → juo-workflow-CtWyuHD6.js} +2 -1
- package/dist/web-components-editor.js +2 -2
- package/dist/web-components-runtime.js +2 -2
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
import { signal, effect, createBlockInstance } from "@juo/orion-core";
|
|
8
8
|
import { d, j as withWrapper, t as subscribeContext, T as ThemeStateContext, E, v as n } from "./theme-state-D4n_2n_h.js";
|
|
9
|
-
import "./juo-workflow-
|
|
9
|
+
import "./juo-workflow-CtWyuHD6.js";
|
|
10
10
|
class Block extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
package/dist/core.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
import { c as createContext, d, w, E, u } from "./theme-state-D4n_2n_h.js";
|
|
8
8
|
import { B, n, C, D, S, T, a, b, e, f, k, l, g, h, i, m, p, o, q, r, s, t, v, j } from "./theme-state-D4n_2n_h.js";
|
|
9
|
-
import { T as T2, W, c, b as b2, a as a2, g as g2, h as h2 } from "./juo-workflow-
|
|
9
|
+
import { T as T2, W, c, b as b2, a as a2, g as g2, h as h2 } from "./juo-workflow-CtWyuHD6.js";
|
|
10
10
|
function createState() {
|
|
11
11
|
const discountCode = d(null);
|
|
12
12
|
const products = d([]);
|
|
@@ -136,6 +136,8 @@ export interface WorkflowServiceDependencies {
|
|
|
136
136
|
api: WorkflowApiAdapter;
|
|
137
137
|
/** ThemeState context for resolving the started workflow */
|
|
138
138
|
themeState: ThemeState;
|
|
139
|
+
/** Shop currency code (e.g. "USD", "EUR"). Injected into actionConfig for blocks that display monetary values. */
|
|
140
|
+
shopCurrencyCode?: string;
|
|
139
141
|
}
|
|
140
142
|
export declare function createWorkflowService(deps: WorkflowServiceDependencies): {
|
|
141
143
|
state: ReadonlySignal<WorkflowState>;
|
|
@@ -147,11 +147,12 @@ function createWorkflowService(deps) {
|
|
|
147
147
|
const interaction = _state.value.currentInteraction;
|
|
148
148
|
if (!interaction)
|
|
149
149
|
return null;
|
|
150
|
+
const actionConfig = deps.shopCurrencyCode ? { ...interaction.actionConfig, currency: deps.shopCurrencyCode } : interaction.actionConfig;
|
|
150
151
|
return {
|
|
151
152
|
interactionId: interaction.interactionId,
|
|
152
153
|
stepId: interaction.stepId,
|
|
153
154
|
actionType: interaction.actionType,
|
|
154
|
-
actionConfig
|
|
155
|
+
actionConfig,
|
|
155
156
|
availableResponses: interaction.availableResponses
|
|
156
157
|
};
|
|
157
158
|
});
|
|
@@ -5,9 +5,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { p as injectContext, E, x as ContextRoot } from "./theme-state-D4n_2n_h.js";
|
|
8
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
8
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-BifGkf1W.js";
|
|
9
9
|
import { c as createEditorBridge, a as createFocusInlineTextMessage, b as createUpdateBlockTranslationMessage } from "./bridge-D-0V6_BT.js";
|
|
10
|
-
import { T as TranslationContext } from "./juo-workflow-
|
|
10
|
+
import { T as TranslationContext } from "./juo-workflow-CtWyuHD6.js";
|
|
11
11
|
const _InlineText = class _InlineText extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { p as injectContext, E, x as ContextRoot } from "./theme-state-D4n_2n_h.js";
|
|
8
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
9
|
-
import { T as TranslationContext } from "./juo-workflow-
|
|
8
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-BifGkf1W.js";
|
|
9
|
+
import { T as TranslationContext } from "./juo-workflow-CtWyuHD6.js";
|
|
10
10
|
class InlineText extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|