@ape.swap/bonds-sdk 1.0.533 → 1.0.535

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.
@@ -6,7 +6,6 @@ interface BondMenuProps {
6
6
  filterOptions: string[];
7
7
  filterOption: string;
8
8
  setFilterOption: (newOption: string) => void;
9
- onHandleQueryChange: (value: string) => void;
10
9
  }
11
10
  declare const BondMenu: React.FC<BondMenuProps>;
12
11
  export default BondMenu;
@@ -6,19 +6,13 @@ import MenuSelect from '../MenuSelect/MenuSelect';
6
6
  import '../../scss/BondMenu.scss';
7
7
  import NetworkFilter from '../NetworkFilter';
8
8
  var BondMenu = function (_a) {
9
- var setChainFilterOption = _a.setChainFilterOption, chainFilterOption = _a.chainFilterOption, filterOptions = _a.filterOptions, filterOption = _a.filterOption, setFilterOption = _a.setFilterOption, onHandleQueryChange = _a.onHandleQueryChange;
9
+ var setChainFilterOption = _a.setChainFilterOption, chainFilterOption = _a.chainFilterOption, filterOptions = _a.filterOptions, filterOption = _a.filterOption, setFilterOption = _a.setFilterOption;
10
10
  var mappedFilters = filterOptions.map(function (filter) {
11
11
  return {
12
12
  label: filter.charAt(0).toUpperCase() + filter.slice(1).toLowerCase(),
13
13
  value: filter,
14
14
  };
15
15
  });
16
- var push = function (url) {
17
- window.location.assign(url);
18
- };
19
- var replace = function (url) {
20
- window.location.replace(url);
21
- };
22
16
  var asPath = window.location.pathname + window.location.search;
23
17
  var handleFilterSelection = useCallback(function (newOption) {
24
18
  setChainFilterOption(['All Chains']);
@@ -40,7 +34,6 @@ var BondMenu = function (_a) {
40
34
  }, onClick: function () {
41
35
  setChainFilterOption(['All Chains']);
42
36
  setFilterOption(asPath.includes('yourBonds') ? 'CLAIMABLE' : 'ALL');
43
- onHandleQueryChange('');
44
37
  }, children: ["Clear All", _jsx(Flex, { sx: { ml: '7px' }, children: _jsx(IconButton, { icon: "close", color: "textDisabledButton", variant: "transparent" }) })] })] }));
45
38
  };
46
39
  export default BondMenu;
@@ -1,6 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
2
- /** @jsxImportSource theme-ui */
3
- import { useCallback, useState } from 'react';
4
2
  import { Flex } from 'theme-ui';
5
3
  import { Input } from '../uikit-sdk/Input';
6
4
  import { Svg, TooltipBubble } from '../uikit-sdk';
@@ -9,23 +7,6 @@ import '../../scss/BondRowHeader.scss';
9
7
  import BondMenu from '../BondMenu/BondMenu';
10
8
  var BondRowHeader = function (_a) {
11
9
  var inputValue = _a.inputValue, setChainFilterOption = _a.setChainFilterOption, chainFilterOption = _a.chainFilterOption, filterOptions = _a.filterOptions, filterOption = _a.filterOption, setFilterOption = _a.setFilterOption, onInputChange = _a.onInputChange, onSort = _a.onSort;
12
- var mappedFilters = filterOptions.map(function (filter) {
13
- return {
14
- label: filter.charAt(0).toUpperCase() + filter.slice(1).toLowerCase(),
15
- value: filter,
16
- };
17
- });
18
- var handleChangeFilterOption = useCallback(function (newOption) {
19
- setFilterOption(newOption);
20
- }, []);
21
- var handleChangeChainFilterOption = useCallback(function (newOptions) {
22
- setChainFilterOption(newOptions);
23
- }, [setChainFilterOption]);
24
- var _b = useState(''), searchQuery = _b[0], setSearchQuery = _b[1];
25
- var handleChangeQuery = useCallback(function (event) {
26
- setSearchQuery(event.target.value);
27
- setFilterOption('ALL');
28
- }, []);
29
- return (_jsxs(Flex, { className: "header-container", children: [_jsx(Flex, { className: "header-container filters", children: _jsx(BondMenu, { chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], setChainFilterOption: handleChangeChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: handleChangeFilterOption, onHandleQueryChange: setSearchQuery }) }), _jsxs(Flex, { className: "header-container rows", children: [_jsxs(Flex, { className: "column column-tokens", children: [_jsx(Flex, { className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] }, children: _jsx(Input, { value: inputValue, onChange: onInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) }), _jsx(Flex, { className: "column column-tokenicons" })] }), _jsxs(Flex, { className: "column column-bondinfo", children: [_jsxs(Flex, { className: "column column-discount", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)", children: ["DISCOUNT", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('discount'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-arr", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)", children: ["ARR", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('arr'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-terms", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)", children: ["TERMS", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('terms'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-tokensremaining", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)", children: ["TOKENS REMAINING", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('tokensRemaining'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsx(Flex, { className: "column column-hotbond" })] })] })] }));
10
+ return (_jsxs(Flex, { className: "header-container", children: [_jsx(Flex, { className: "header-container filters", children: _jsx(BondMenu, { chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: setFilterOption }) }), _jsxs(Flex, { className: "header-container rows", children: [_jsxs(Flex, { className: "column column-tokens", children: [_jsx(Flex, { className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] }, children: _jsx(Input, { value: inputValue, onChange: onInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) }), _jsx(Flex, { className: "column column-tokenicons" })] }), _jsxs(Flex, { className: "column column-bondinfo", children: [_jsxs(Flex, { className: "column column-discount", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)", children: ["DISCOUNT", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('discount'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-arr", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)", children: ["ARR", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('arr'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-terms", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)", children: ["TERMS", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('terms'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-tokensremaining", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)", children: ["TOKENS REMAINING", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('tokensRemaining'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsx(Flex, { className: "column column-hotbond" })] })] })] }));
30
11
  };
31
12
  export default BondRowHeader;
@@ -216,9 +216,6 @@ var Bonds = function (_a) {
216
216
  };
217
217
  // Search logic
218
218
  var _j = useState(''), inputValue = _j[0], setInputValue = _j[1];
219
- var handleInputChange = function (event) {
220
- setInputValue(event.target.value);
221
- };
222
219
  var topTags = useTopTags(sortedBonds);
223
220
  var filterOptions = __spreadArray(__spreadArray(['ALL'], topTags, true), ['SOLD OUT'], false);
224
221
  var _k = useState(filterOptions[0]), filterOption = _k[0], setFilterOption = _k[1];
@@ -249,6 +246,9 @@ var Bonds = function (_a) {
249
246
  var handleChangeChainFilterOption = useCallback(function (newOptions) {
250
247
  setChainFilterOption(newOptions);
251
248
  }, [setChainFilterOption]);
249
+ var handleInputChange = function (event) {
250
+ setInputValue(event.target.value);
251
+ };
252
252
  // Page render logic
253
253
  var _m = useState(false), bondsRendered = _m[0], setBondsRendered = _m[1];
254
254
  useEffect(function () {
@@ -8,7 +8,6 @@
8
8
 
9
9
  .filters.network {
10
10
  display: flex;
11
- width: 20%;
12
11
  }
13
12
 
14
13
  .filters.desktop-rec {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.533",
6
+ "version": "1.0.535",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",