@wise/dynamic-flow-client 4.19.3-experimental-6e22f2a → 4.19.3

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/build/main.js CHANGED
@@ -7519,13 +7519,16 @@ var useRerender = () => {
7519
7519
  return (0, import_react3.useCallback)(() => setState({}), []);
7520
7520
  };
7521
7521
 
7522
+ // src/revamp/utils/normalise-flow-id.ts
7523
+ var normaliseFlowId = (flowId) => flowId.toLowerCase().replace(/[^a-z-]/g, "-");
7524
+
7522
7525
  // src/revamp/DynamicFlowCore.tsx
7523
7526
  var import_jsx_runtime6 = require("react/jsx-runtime");
7524
7527
  var className = "dynamic-flow";
7525
7528
  function DynamicFlowCore(props) {
7526
7529
  var _a;
7527
7530
  const { flowId, renderers, httpClient, onEvent, onError, onLog } = props;
7528
- const normalisedFlowId = flowId.replace(" ", "-");
7531
+ const normalisedFlowId = normaliseFlowId(flowId);
7529
7532
  const { rootComponent } = useDynamicFlowCore(__spreadProps(__spreadValues({}, props), {
7530
7533
  scrollToTop: (behavior) => {
7531
7534
  var _a2;
package/build/main.mjs CHANGED
@@ -7476,13 +7476,16 @@ var useRerender = () => {
7476
7476
  return useCallback2(() => setState({}), []);
7477
7477
  };
7478
7478
 
7479
+ // src/revamp/utils/normalise-flow-id.ts
7480
+ var normaliseFlowId = (flowId) => flowId.toLowerCase().replace(/[^a-z-]/g, "-");
7481
+
7479
7482
  // src/revamp/DynamicFlowCore.tsx
7480
7483
  import { jsx as jsx6 } from "react/jsx-runtime";
7481
7484
  var className = "dynamic-flow";
7482
7485
  function DynamicFlowCore(props) {
7483
7486
  var _a;
7484
7487
  const { flowId, renderers, httpClient, onEvent, onError, onLog } = props;
7485
- const normalisedFlowId = flowId.replace(" ", "-");
7488
+ const normalisedFlowId = normaliseFlowId(flowId);
7486
7489
  const { rootComponent } = useDynamicFlowCore(__spreadProps(__spreadValues({}, props), {
7487
7490
  scrollToTop: (behavior) => {
7488
7491
  var _a2;
@@ -0,0 +1 @@
1
+ export declare const normaliseFlowId: (flowId: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "4.19.3-experimental-6e22f2a",
3
+ "version": "4.19.3",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",