@rango-dev/widget-embedded 0.17.1-next.14 → 0.17.1-next.16

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.
Files changed (23) hide show
  1. package/dist/containers/App/App.d.ts.map +1 -1
  2. package/dist/hooks/useLanguage.d.ts +1 -1
  3. package/dist/hooks/useLanguage.d.ts.map +1 -1
  4. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.d.ts +1 -1
  5. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts +2 -2
  6. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts.map +1 -1
  7. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +3 -5
  8. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts.map +1 -1
  9. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts +1 -0
  10. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts.map +1 -1
  11. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts +5 -1
  12. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts.map +1 -1
  13. package/dist/index.js +1 -1
  14. package/dist/index.js.map +3 -3
  15. package/package.json +2 -2
  16. package/src/containers/App/App.tsx +1 -3
  17. package/src/hooks/useLanguage.ts +2 -2
  18. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.ts +1 -1
  19. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts +37 -7
  20. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts +60 -0
  21. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.test.ts +78 -3
  22. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts +13 -4
  23. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts +6 -1
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../src/containers/App/App.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAgBxE,wBAAgB,IAAI,sBA6CnB"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../src/containers/App/App.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAgBxE,wBAAgB,IAAI,sBA2CnB"}
@@ -4,7 +4,7 @@ interface UseLanguage {
4
4
  languages: LanguageItem[];
5
5
  defaultLanguage: Language;
6
6
  activeLanguage: Language;
7
- changeLanguage: (language: Language) => void;
7
+ changeLanguage: (language?: Language) => void;
8
8
  }
9
9
  export declare function useLanguage(): UseLanguage;
10
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useLanguage.d.ts","sourceRoot":"","sources":["../../src/hooks/useLanguage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK9C,UAAU,WAAW;IACnB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,eAAe,EAAE,QAAQ,CAAC;IAC1B,cAAc,EAAE,QAAQ,CAAC;IACzB,cAAc,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,WAAW,IAAI,WAAW,CAYzC"}
1
+ {"version":3,"file":"useLanguage.d.ts","sourceRoot":"","sources":["../../src/hooks/useLanguage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK9C,UAAU,WAAW;IACnB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,eAAe,EAAE,QAAQ,CAAC;IAC1B,cAAc,EAAE,QAAQ,CAAC;IACzB,cAAc,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC/C;AAED,wBAAgB,WAAW,IAAI,WAAW,CAYzC"}
@@ -1,2 +1,2 @@
1
- export declare const MOST_USED_BLOCKChAINS: string[];
1
+ export declare const MOST_USED_BLOCKCHAINS: string[];
2
2
  //# sourceMappingURL=usePrepareBlockchainList.constants.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { PrepareListOptions, PrepareListOutput } from './usePrepareBlockchainList.types';
1
+ import type { PrepareListOptions, UsePrepareList } from './usePrepareBlockchainList.types';
2
2
  import type { BlockchainMeta } from 'rango-sdk';
3
3
  /**
4
4
  *
@@ -6,5 +6,5 @@ import type { BlockchainMeta } from 'rango-sdk';
6
6
  * this function is getting the raw blockchains list and return a list for showing in UI.
7
7
  *
8
8
  */
9
- export declare function usePrepareBlockchainList(blockchains: BlockchainMeta[], options?: PrepareListOptions): PrepareListOutput;
9
+ export declare function usePrepareBlockchainList(blockchains: BlockchainMeta[], options?: PrepareListOptions): UsePrepareList;
10
10
  //# sourceMappingURL=usePrepareBlockchainList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrepareBlockchainList.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQhD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,cAAc,EAAE,EAC7B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,iBAAiB,CAgBnB"}
1
+ {"version":3,"file":"usePrepareBlockchainList.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQhD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,cAAc,EAAE,EAC7B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,cAAc,CAyBhB"}
@@ -1,10 +1,8 @@
1
- import type { PrepareListOptions } from './usePrepareBlockchainList.types';
1
+ import type { PrepareListOptions, PrepareOutput } from './usePrepareBlockchainList.types';
2
2
  import type { BlockchainMeta } from 'rango-sdk';
3
- export declare function prepare(blockchains: BlockchainMeta[], preferredBlockchains: string[], options?: PrepareListOptions): {
4
- list: BlockchainMeta[];
5
- more: BlockchainMeta[];
6
- };
3
+ export declare function prepare(blockchains: BlockchainMeta[], preferredBlockchains: string[], options?: PrepareListOptions): PrepareOutput;
7
4
  /** There is a hardcoded list of blockchains that we want to show them first in the list. */
8
5
  export declare function sortByMostUsedBlockchains(a: BlockchainMeta, b: BlockchainMeta): 1 | -1 | 0;
9
6
  export declare function generateSortByPreferredBlockchainsFor(preferredBlockchains: string[]): (a: BlockchainMeta, b: BlockchainMeta) => 1 | -1 | 0;
7
+ export declare function isInVisibleList(blockchain: string, prepareOutput: PrepareOutput): boolean;
10
8
  //# sourceMappingURL=usePrepareBlockchainList.helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrepareBlockchainList.helpers.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,wBAAgB,OAAO,CACrB,WAAW,EAAE,cAAc,EAAE,EAC7B,oBAAoB,EAAE,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,kBAAkB;;;EA4C7B;AAED,4FAA4F;AAC5F,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,cAAc,EACjB,CAAC,EAAE,cAAc,cAqBlB;AAED,wBAAgB,qCAAqC,CACnD,oBAAoB,EAAE,MAAM,EAAE,OAEK,cAAc,KAAK,cAAc,gBAwBrE"}
1
+ {"version":3,"file":"usePrepareBlockchainList.helpers.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,wBAAgB,OAAO,CACrB,WAAW,EAAE,cAAc,EAAE,EAC7B,oBAAoB,EAAE,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,aAAa,CA+Df;AAED,4FAA4F;AAC5F,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,cAAc,EACjB,CAAC,EAAE,cAAc,cAqBlB;AAED,wBAAgB,qCAAqC,CACnD,oBAAoB,EAAE,MAAM,EAAE,OAEK,cAAc,KAAK,cAAc,gBAwBrE;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa,GAC3B,OAAO,CAET"}
@@ -1,3 +1,4 @@
1
1
  import type { BlockchainMeta } from 'rango-sdk';
2
+ export declare const sampleDefaultBlockchainNames: string[];
2
3
  export declare const sampleBlockchains: BlockchainMeta[];
3
4
  //# sourceMappingURL=usePrepareBlockchainList.mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrepareBlockchainList.mock.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAwhG7C,CAAC"}
1
+ {"version":3,"file":"usePrepareBlockchainList.mock.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,4BAA4B,UA0DxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAwhG7C,CAAC"}
@@ -3,9 +3,13 @@ export interface PrepareListOptions {
3
3
  limit?: number;
4
4
  selected?: string;
5
5
  }
6
- export interface PrepareListOutput {
6
+ export interface PrepareOutput {
7
7
  list: BlockchainMeta[];
8
8
  more: BlockchainMeta[];
9
+ }
10
+ export interface UsePrepareList {
11
+ list: PrepareOutput['list'];
12
+ more: PrepareOutput['more'];
9
13
  history: string[];
10
14
  }
11
15
  //# sourceMappingURL=usePrepareBlockchainList.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePrepareBlockchainList.types.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
1
+ {"version":3,"file":"usePrepareBlockchainList.types.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,IAAI,EAAE,cAAc,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}