@swan-io/shared-business 17.0.0 → 18.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/shared-business",
3
- "version": "17.0.0",
3
+ "version": "18.0.0",
4
4
  "engines": {
5
5
  "node": ">22.12.0"
6
6
  },
@@ -28,13 +28,13 @@
28
28
  "react": ">=19.0.0",
29
29
  "react-dom": ">=19.0.0",
30
30
  "react-native-web": ">=0.21.2",
31
- "@swan-io/lake": "17.0.0"
31
+ "@swan-io/lake": "18.0.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@formatjs/intl": "^4.1.16",
35
35
  "@placekit/client-js": "^2.3.0",
36
- "@swan-io/boxed": "^3.2.1",
37
- "@swan-io/request": "^3.1.0",
36
+ "@bloodyowl/boxed": "^3.4.0",
37
+ "@bloodyowl/request": "^3.3.0",
38
38
  "@swan-io/use-form": "^3.1.0",
39
39
  "dayjs": "^1.11.21",
40
40
  "iban": "^0.0.14",
@@ -53,6 +53,6 @@
53
53
  "react-dom": "^19.2.7",
54
54
  "react-native-web": "^0.21.2",
55
55
  "type-fest": "^5.8.0",
56
- "@swan-io/lake": "17.0.0"
56
+ "@swan-io/lake": "18.0.0"
57
57
  }
58
58
  }
@@ -1,4 +1,4 @@
1
- import { Option } from "@swan-io/boxed";
1
+ import { Option } from "@bloodyowl/boxed";
2
2
  import { ValidatorResult } from "@swan-io/use-form";
3
3
  import { Except } from "type-fest";
4
4
  import { DateFormat } from "../utils/i18n";
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Option } from "@swan-io/boxed";
2
+ import { Option } from "@bloodyowl/boxed";
3
3
  import { BottomPanel } from "@swan-io/lake/src/components/BottomPanel";
4
4
  import { Box } from "@swan-io/lake/src/components/Box";
5
5
  import { Fill } from "@swan-io/lake/src/components/Fill";
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Option, Result } from "@swan-io/boxed";
2
+ import { Option, Result } from "@bloodyowl/boxed";
3
3
  import { Icon } from "@swan-io/lake/src/components/Icon";
4
4
  import { LakeButton } from "@swan-io/lake/src/components/LakeButton";
5
5
  import { LakeHeading } from "@swan-io/lake/src/components/LakeHeading";
@@ -1,4 +1,4 @@
1
- import { Future } from "@swan-io/boxed";
1
+ import { Future } from "@bloodyowl/boxed";
2
2
  import { SwanFile } from "../utils/SwanFile";
3
3
  type Props = {
4
4
  file: SwanFile;
@@ -1,4 +1,4 @@
1
- import { Future, Result } from "@swan-io/boxed";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
2
  import { IconName } from "@swan-io/lake/src/components/Icon";
3
3
  import { Ref } from "react";
4
4
  import { Config } from "../hooks/useFilesUploader";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Lazy } from "@swan-io/boxed";
2
+ import { Lazy } from "@bloodyowl/boxed";
3
3
  import { Svg, Use } from "@swan-io/lake/src/components/Svg";
4
4
  import { getFlagGlyphName } from "@swan-io/lake/src/utils/string";
5
5
  import { useEffect, useMemo, useState } from "react";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Array, Future, Option, Result } from "@swan-io/boxed";
2
+ import { Array, Future, Option, Result } from "@bloodyowl/boxed";
3
3
  import { AutocompleteSearchInput } from "@swan-io/lake/src/components/AutocompleteSearchInput";
4
4
  import { useCallback } from "react";
5
5
  import { countriesWithMultipleCCA3, getCCA2forCCA3 } from "../constants/countries";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Array, Future, Option, Result } from "@swan-io/boxed";
2
+ import { Array, Future, Option, Result } from "@bloodyowl/boxed";
3
3
  import { AutocompleteSearchInput } from "@swan-io/lake/src/components/AutocompleteSearchInput";
4
4
  import { useCallback } from "react";
5
5
  import { countriesWithMultipleCCA3, getCCA2forCCA3 } from "../constants/countries";
@@ -1,4 +1,4 @@
1
- import { Array, Deferred, Dict, Option } from "@swan-io/boxed";
1
+ import { Array, Deferred, Dict, Option } from "@bloodyowl/boxed";
2
2
  import { useCallback, useEffect } from "react";
3
3
  const keys = {
4
4
  "end-user": "275d1c72-3760-4303-a7f0-806f5266a251",
@@ -1,5 +1,5 @@
1
- import { Future, Result } from "@swan-io/boxed";
2
- import { NetworkError, Response, TimeoutError } from "@swan-io/request";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
+ import { NetworkError, Response, TimeoutError } from "@bloodyowl/request";
3
3
  import { Ref } from "react";
4
4
  import { CountryCCA3 } from "../constants/countries";
5
5
  import { UploadFileInput, UploadOutputWithId } from "../hooks/useFilesUploader";
@@ -1,5 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Array, Option } from "@swan-io/boxed";
2
+ import { Array, Option } from "@bloodyowl/boxed";
3
+ import { badStatusToError, Request, } from "@bloodyowl/request";
3
4
  import { Box } from "@swan-io/lake/src/components/Box";
4
5
  import { Form } from "@swan-io/lake/src/components/Form";
5
6
  import { LakeButton, LakeButtonGroup } from "@swan-io/lake/src/components/LakeButton";
@@ -11,7 +12,6 @@ import { ReadOnlyFieldList } from "@swan-io/lake/src/components/ReadOnlyFieldLis
11
12
  import { Space } from "@swan-io/lake/src/components/Space";
12
13
  import { colors } from "@swan-io/lake/src/constants/design";
13
14
  import { isNotNullish } from "@swan-io/lake/src/utils/nullish";
14
- import { badStatusToError, Request } from "@swan-io/request";
15
15
  import { Fragment, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
16
16
  import { StyleSheet } from "react-native";
17
17
  import { match, P } from "ts-pattern";
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Array, Option } from "@swan-io/boxed";
2
+ import { Array, Option } from "@bloodyowl/boxed";
3
3
  import { Box } from "@swan-io/lake/src/components/Box";
4
4
  import { Icon } from "@swan-io/lake/src/components/Icon";
5
5
  import { LakeText } from "@swan-io/lake/src/components/LakeText";
@@ -1,5 +1,5 @@
1
1
  var _a, _b;
2
- import { Result } from "@swan-io/boxed";
2
+ import { Result } from "@bloodyowl/boxed";
3
3
  import { deburr } from "@swan-io/lake/src/utils/string";
4
4
  import { locale } from "../utils/i18n";
5
5
  const readonlyCountries = [
@@ -1,4 +1,4 @@
1
- import { Future, Result } from "@swan-io/boxed";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
2
  import { SwanFile } from "../utils/SwanFile";
3
3
  export type UploadFileInput<UploadOutput> = {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { BadStatusError } from "@swan-io/request";
1
+ import { BadStatusError } from "@bloodyowl/request";
2
2
  import { describe, expect, it } from "vitest";
3
3
  import { formatCurrencyIso, formatCurrencySymbol, getRejectionReasonLabel, isTranslationKey, translateError, } from "../i18n";
4
4
  // The i18n module reads `navigator.languages` at import time to pick its locale.
@@ -1,4 +1,4 @@
1
- import { Future, Result } from "@swan-io/boxed";
1
+ import { Future, Result } from "@bloodyowl/boxed";
2
2
  import { ReactNode } from "react";
3
3
  export declare class FlagClient<Flags extends Record<string, unknown>, Context extends Record<string, string | number | boolean>> {
4
4
  private readonly url;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Request } from "@swan-io/request";
2
+ import { Request } from "@bloodyowl/request";
3
3
  import { createContext, useContext, useEffect, useState } from "react";
4
4
  export class FlagClient {
5
5
  constructor(url, initialContext = {}) {
package/src/utils/i18n.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { BadStatusError } from "@bloodyowl/request";
1
2
  import { createIntl, createIntlCache } from "@formatjs/intl";
2
3
  import { isNullish } from "@swan-io/lake/src/utils/nullish";
3
4
  import { getRifmProps } from "@swan-io/lake/src/utils/rifm";
4
- import { BadStatusError } from "@swan-io/request";
5
5
  import dayjs from "dayjs";
6
6
  import dayjsLocaleDE from "dayjs/locale/de";
7
7
  import dayjsLocaleEN from "dayjs/locale/en";