@nok-integration/storefront-react 0.19.21 → 0.19.22

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/index.mjs CHANGED
@@ -7383,6 +7383,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7383
7383
  const [order, setOrder] = useState(null);
7384
7384
  const [ret, setRet] = useState(null);
7385
7385
  const [state, setState] = useState("loading");
7386
+ const [justFiled, setJustFiled] = useState(false);
7386
7387
  const [errorCode, setErrorCode] = useState(void 0);
7387
7388
  const [busy, setBusy] = useState(false);
7388
7389
  const load = useCallback(async () => {
@@ -7410,6 +7411,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7410
7411
  items: items2
7411
7412
  });
7412
7413
  setRet(created);
7414
+ setJustFiled(true);
7413
7415
  emit({
7414
7416
  type: "return_requested",
7415
7417
  orderRef,
@@ -7442,11 +7444,12 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7442
7444
  });
7443
7445
  }
7444
7446
  if (ret) {
7445
- return ret.status === "reported" ? jsx(ReturnLabelView, {
7447
+ return justFiled && ret.status === "reported" ? jsx(ReturnLabelView, {
7446
7448
  ret,
7447
- ...onDone ? {
7448
- onDone
7449
- } : {}
7449
+ onDone: () => {
7450
+ setJustFiled(false);
7451
+ onDone?.();
7452
+ }
7450
7453
  }) : jsx(ReturnTrackingView, {
7451
7454
  ret,
7452
7455
  ...locale ? {
@@ -8965,11 +8968,11 @@ function ShippingInfo() {
8965
8968
  })]
8966
8969
  });
8967
8970
  }
8968
- const bar = "_bar_xqpxa_1";
8969
- const floating$1 = "_floating_xqpxa_31";
8970
- const divider = "_divider_xqpxa_37";
8971
- const info$1 = "_info_xqpxa_41";
8972
- const actions = "_actions_xqpxa_49";
8971
+ const bar = "_bar_v5jjj_1";
8972
+ const floating$1 = "_floating_v5jjj_52";
8973
+ const divider = "_divider_v5jjj_58";
8974
+ const info$1 = "_info_v5jjj_62";
8975
+ const actions = "_actions_v5jjj_70";
8973
8976
  const styles$k = {
8974
8977
  bar,
8975
8978
  floating: floating$1,
@@ -7383,6 +7383,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7383
7383
  const [order, setOrder] = useState(null);
7384
7384
  const [ret, setRet] = useState(null);
7385
7385
  const [state, setState] = useState("loading");
7386
+ const [justFiled, setJustFiled] = useState(false);
7386
7387
  const [errorCode, setErrorCode] = useState(void 0);
7387
7388
  const [busy, setBusy] = useState(false);
7388
7389
  const load = useCallback(async () => {
@@ -7410,6 +7411,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7410
7411
  items: items2
7411
7412
  });
7412
7413
  setRet(created);
7414
+ setJustFiled(true);
7413
7415
  emit({
7414
7416
  type: "return_requested",
7415
7417
  orderRef,
@@ -7442,11 +7444,12 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7442
7444
  });
7443
7445
  }
7444
7446
  if (ret) {
7445
- return ret.status === "reported" ? jsx(ReturnLabelView, {
7447
+ return justFiled && ret.status === "reported" ? jsx(ReturnLabelView, {
7446
7448
  ret,
7447
- ...onDone ? {
7448
- onDone
7449
- } : {}
7449
+ onDone: () => {
7450
+ setJustFiled(false);
7451
+ onDone?.();
7452
+ }
7450
7453
  }) : jsx(ReturnTrackingView, {
7451
7454
  ret,
7452
7455
  ...locale ? {
@@ -8965,11 +8968,11 @@ function ShippingInfo() {
8965
8968
  })]
8966
8969
  });
8967
8970
  }
8968
- const bar = "_bar_xqpxa_1";
8969
- const floating$1 = "_floating_xqpxa_31";
8970
- const divider = "_divider_xqpxa_37";
8971
- const info$1 = "_info_xqpxa_41";
8972
- const actions = "_actions_xqpxa_49";
8971
+ const bar = "_bar_v5jjj_1";
8972
+ const floating$1 = "_floating_v5jjj_52";
8973
+ const divider = "_divider_v5jjj_58";
8974
+ const info$1 = "_info_v5jjj_62";
8975
+ const actions = "_actions_v5jjj_70";
8973
8976
  const styles$k = {
8974
8977
  bar,
8975
8978
  floating: floating$1,
@@ -2340,9 +2340,10 @@
2340
2340
  height: 1px;
2341
2341
  background: var(--color-border-default);
2342
2342
  }
2343
- ._bar_xqpxa_1 {
2343
+ ._bar_v5jjj_1 {
2344
2344
  position: sticky;
2345
2345
  bottom: 0;
2346
+ bottom: calc(100lvh - 100dvh);
2346
2347
  left: 0;
2347
2348
  right: 0;
2348
2349
  display: flex;
@@ -2352,24 +2353,24 @@
2352
2353
  background: var(--color-surface-default);
2353
2354
  z-index: 50;
2354
2355
  }
2355
- ._floating_xqpxa_31 {
2356
+ ._floating_v5jjj_52 {
2356
2357
  border-radius: var(--radius-12) var(--radius-12) 0 0;
2357
2358
  filter: drop-shadow(0 -4px 12px rgba(206, 206, 206, 0.48));
2358
2359
  }
2359
- ._divider_xqpxa_37 {
2360
+ ._divider_v5jjj_58 {
2360
2361
  border-top: 1px solid var(--color-border-default);
2361
2362
  }
2362
- ._info_xqpxa_41 {
2363
+ ._info_v5jjj_62 {
2363
2364
  display: flex;
2364
2365
  align-items: center;
2365
2366
  justify-content: space-between;
2366
2367
  font-weight: var(--font-weight-bold);
2367
2368
  }
2368
- ._actions_xqpxa_49 {
2369
+ ._actions_v5jjj_70 {
2369
2370
  display: flex;
2370
2371
  gap: var(--space-8);
2371
2372
  }
2372
- ._actions_xqpxa_49 > * {
2373
+ ._actions_v5jjj_70 > * {
2373
2374
  flex: 1 1 0;
2374
2375
  }
2375
2376
  ._surface_nkc99_15 {
package/dist/styles.css CHANGED
@@ -2340,9 +2340,10 @@
2340
2340
  height: 1px;
2341
2341
  background: var(--color-border-default);
2342
2342
  }
2343
- ._bar_xqpxa_1 {
2343
+ ._bar_v5jjj_1 {
2344
2344
  position: sticky;
2345
2345
  bottom: 0;
2346
+ bottom: calc(100lvh - 100dvh);
2346
2347
  left: 0;
2347
2348
  right: 0;
2348
2349
  display: flex;
@@ -2352,24 +2353,24 @@
2352
2353
  background: var(--color-surface-default);
2353
2354
  z-index: 50;
2354
2355
  }
2355
- ._floating_xqpxa_31 {
2356
+ ._floating_v5jjj_52 {
2356
2357
  border-radius: var(--radius-12) var(--radius-12) 0 0;
2357
2358
  filter: drop-shadow(0 -4px 12px rgba(206, 206, 206, 0.48));
2358
2359
  }
2359
- ._divider_xqpxa_37 {
2360
+ ._divider_v5jjj_58 {
2360
2361
  border-top: 1px solid var(--color-border-default);
2361
2362
  }
2362
- ._info_xqpxa_41 {
2363
+ ._info_v5jjj_62 {
2363
2364
  display: flex;
2364
2365
  align-items: center;
2365
2366
  justify-content: space-between;
2366
2367
  font-weight: var(--font-weight-bold);
2367
2368
  }
2368
- ._actions_xqpxa_49 {
2369
+ ._actions_v5jjj_70 {
2369
2370
  display: flex;
2370
2371
  gap: var(--space-8);
2371
2372
  }
2372
- ._actions_xqpxa_49 > * {
2373
+ ._actions_v5jjj_70 > * {
2373
2374
  flex: 1 1 0;
2374
2375
  }
2375
2376
  ._surface_nkc99_15 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nok-integration/storefront-react",
3
- "version": "0.19.21",
3
+ "version": "0.19.22",
4
4
  "description": "Mountable React storefront components: catalogue, product detail and cart, mounted directly into a host DOM tree. No iframe.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",