@wise/dynamic-flow-client 4.3.8 → 4.3.9

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
@@ -2508,6 +2508,8 @@ var getComponentMultiPersistAsync = (update, performPersistAsync) => (
2508
2508
  ...draft.persistedState.slice(0, index),
2509
2509
  ...draft.persistedState.slice(index + 1)
2510
2510
  ];
2511
+ draft.value.splice(index, 1);
2512
+ draft.files.splice(index, 1);
2511
2513
  });
2512
2514
  throw error;
2513
2515
  });
@@ -6357,12 +6359,12 @@ function useDynamicFlowCore(props) {
6357
6359
  );
6358
6360
  const trackEvent = (0, import_react3.useCallback)(
6359
6361
  (eventName, properties) => {
6360
- var _a2, _b, _c, _d;
6361
- const stepId = (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key;
6362
- const analytics = (_d = stepRef.current) == null ? void 0 : _d.analytics;
6363
- const metadata = __spreadValues(__spreadValues(__spreadValues({
6362
+ var _a2, _b, _c, _d, _e;
6363
+ const stepId = stepRef.current ? (_d = (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key) != null ? _d : "" : null;
6364
+ const analytics = (_e = stepRef.current) == null ? void 0 : _e.analytics;
6365
+ const metadata = __spreadValues(__spreadValues(__spreadValues(__spreadValues({
6364
6366
  flowId
6365
- }, stepId ? { stepId } : {}), analytics), properties);
6367
+ }, stepId !== null ? { stepId } : {}), stepRef.current ? { stepCount: stepCount.current } : {}), analytics), properties);
6366
6368
  try {
6367
6369
  onEvent == null ? void 0 : onEvent(`Dynamic Flow - ${eventName}`, __spreadValues({}, metadata));
6368
6370
  } catch (e) {
@@ -6374,12 +6376,12 @@ function useDynamicFlowCore(props) {
6374
6376
  const trackCoreEvent = trackEvent;
6375
6377
  const logEvent = (0, import_react3.useCallback)(
6376
6378
  (level, message, properties) => {
6377
- var _a2, _b, _c;
6379
+ var _a2, _b, _c, _d;
6380
+ const stepId = stepRef.current ? (_d = (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key) != null ? _d : "" : null;
6378
6381
  try {
6379
- onLog == null ? void 0 : onLog(level, message, __spreadProps(__spreadValues({}, properties), {
6380
- flowId,
6381
- stepId: (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key
6382
- }));
6382
+ onLog == null ? void 0 : onLog(level, message, __spreadValues(__spreadValues(__spreadProps(__spreadValues({}, properties), {
6383
+ flowId
6384
+ }), stepId !== null ? { stepId } : {}), stepRef.current ? { stepCount: stepCount.current } : {}));
6383
6385
  } catch (e) {
6384
6386
  }
6385
6387
  },
package/build/main.mjs CHANGED
@@ -2465,6 +2465,8 @@ var getComponentMultiPersistAsync = (update, performPersistAsync) => (
2465
2465
  ...draft.persistedState.slice(0, index),
2466
2466
  ...draft.persistedState.slice(index + 1)
2467
2467
  ];
2468
+ draft.value.splice(index, 1);
2469
+ draft.files.splice(index, 1);
2468
2470
  });
2469
2471
  throw error;
2470
2472
  });
@@ -6314,12 +6316,12 @@ function useDynamicFlowCore(props) {
6314
6316
  );
6315
6317
  const trackEvent = useCallback2(
6316
6318
  (eventName, properties) => {
6317
- var _a2, _b, _c, _d;
6318
- const stepId = (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key;
6319
- const analytics = (_d = stepRef.current) == null ? void 0 : _d.analytics;
6320
- const metadata = __spreadValues(__spreadValues(__spreadValues({
6319
+ var _a2, _b, _c, _d, _e;
6320
+ const stepId = stepRef.current ? (_d = (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key) != null ? _d : "" : null;
6321
+ const analytics = (_e = stepRef.current) == null ? void 0 : _e.analytics;
6322
+ const metadata = __spreadValues(__spreadValues(__spreadValues(__spreadValues({
6321
6323
  flowId
6322
- }, stepId ? { stepId } : {}), analytics), properties);
6324
+ }, stepId !== null ? { stepId } : {}), stepRef.current ? { stepCount: stepCount.current } : {}), analytics), properties);
6323
6325
  try {
6324
6326
  onEvent == null ? void 0 : onEvent(`Dynamic Flow - ${eventName}`, __spreadValues({}, metadata));
6325
6327
  } catch (e) {
@@ -6331,12 +6333,12 @@ function useDynamicFlowCore(props) {
6331
6333
  const trackCoreEvent = trackEvent;
6332
6334
  const logEvent = useCallback2(
6333
6335
  (level, message, properties) => {
6334
- var _a2, _b, _c;
6336
+ var _a2, _b, _c, _d;
6337
+ const stepId = stepRef.current ? (_d = (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key) != null ? _d : "" : null;
6335
6338
  try {
6336
- onLog == null ? void 0 : onLog(level, message, __spreadProps(__spreadValues({}, properties), {
6337
- flowId,
6338
- stepId: (_c = (_a2 = stepRef.current) == null ? void 0 : _a2.id) != null ? _c : (_b = stepRef.current) == null ? void 0 : _b.key
6339
- }));
6339
+ onLog == null ? void 0 : onLog(level, message, __spreadValues(__spreadValues(__spreadProps(__spreadValues({}, properties), {
6340
+ flowId
6341
+ }), stepId !== null ? { stepId } : {}), stepRef.current ? { stepCount: stepCount.current } : {}));
6340
6342
  } catch (e) {
6341
6343
  }
6342
6344
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "4.3.8",
3
+ "version": "4.3.9",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",