@jsenv/navi 0.26.33 → 0.26.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.
@@ -20282,10 +20282,15 @@ const useExecuteAction = (
20282
20282
  removeErrorMessage();
20283
20283
  setError(null);
20284
20284
 
20285
- const validationMessageTarget = requester || elementRef.current;
20285
+ const element = elementRef.current;
20286
+ const validationMessageTarget = requester || element;
20286
20287
  validationMessageTargetRef.current = validationMessageTarget;
20287
20288
 
20288
- dispatchPublicCustomEvent("navi_action_start", sharedActionEventDetail);
20289
+ dispatchPublicCustomEvent(
20290
+ element,
20291
+ "navi_action_start",
20292
+ sharedActionEventDetail,
20293
+ );
20289
20294
 
20290
20295
  return action[method]({
20291
20296
  reason: `"${event.type}" event on ${(() => {
@@ -20304,26 +20309,28 @@ const useExecuteAction = (
20304
20309
  return `<${tagName}>`;
20305
20310
  })()}`,
20306
20311
  onAbort: (reason) => {
20312
+ const element = elementRef.current;
20307
20313
  if (
20308
20314
  // at this stage the action side effect might have removed the <element> from the DOM
20309
20315
  // (in theory no because action side effect are batched to happen after)
20310
20316
  // but other side effects might do this
20311
- elementRef.current
20317
+ element
20312
20318
  ) {
20313
- dispatchPublicCustomEvent("navi_action_abort", {
20319
+ dispatchPublicCustomEvent(element, "navi_action_abort", {
20314
20320
  ...sharedActionEventDetail,
20315
20321
  reason,
20316
20322
  });
20317
20323
  }
20318
20324
  },
20319
20325
  onError: (error) => {
20326
+ const element = elementRef.current;
20320
20327
  if (
20321
20328
  // at this stage the action side effect might have removed the <element> from the DOM
20322
20329
  // (in theory no because action side effect are batched to happen after)
20323
20330
  // but other side effects might do this
20324
- elementRef.current
20331
+ element
20325
20332
  ) {
20326
- dispatchPublicCustomEvent("navi_action_error", {
20333
+ dispatchPublicCustomEvent(element, "navi_action_error", {
20327
20334
  ...sharedActionEventDetail,
20328
20335
  error,
20329
20336
  });
@@ -20335,13 +20342,14 @@ const useExecuteAction = (
20335
20342
  }
20336
20343
  },
20337
20344
  onComplete: (data) => {
20345
+ const element = elementRef.current;
20338
20346
  if (
20339
20347
  // at this stage the action side effect might have removed the <element> from the DOM
20340
20348
  // (in theory no because action side effect are batched to happen after)
20341
20349
  // but other side effects might do this
20342
- elementRef.current
20350
+ element
20343
20351
  ) {
20344
- dispatchPublicCustomEvent("navi_action_end", {
20352
+ dispatchPublicCustomEvent(element, "navi_action_end", {
20345
20353
  ...sharedActionEventDetail,
20346
20354
  data,
20347
20355
  });