@1money/component-ui 0.0.65 → 0.0.67-alpha.1
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/es/business/Filter/DateRange/DateRange.d.ts +2 -0
- package/es/business/Filter/DateRange/DateRange.js +393 -0
- package/es/business/Filter/DateRange/index.d.ts +2 -0
- package/es/business/Filter/DateRange/index.js +3 -0
- package/es/business/Filter/DateRange/interface.d.ts +68 -0
- package/es/business/Filter/DateRange/interface.js +9 -0
- package/es/business/Filter/DateRange/style/DateRange.css +85 -0
- package/es/business/Filter/DateRange/style/css.js +2 -0
- package/es/business/Filter/DateRange/style/index.d.ts +1 -0
- package/es/business/Filter/DateRange/style/index.js +2 -0
- package/es/business/Filter/Dropdown/Dropdown.d.ts +2 -0
- package/es/business/Filter/Dropdown/Dropdown.js +340 -0
- package/es/business/Filter/Dropdown/index.d.ts +2 -0
- package/es/business/Filter/Dropdown/index.js +3 -0
- package/es/business/Filter/Dropdown/interface.d.ts +136 -0
- package/es/business/Filter/Dropdown/interface.js +2 -0
- package/es/business/Filter/Dropdown/style/Dropdown.css +94 -0
- package/es/business/Filter/Dropdown/style/css.js +2 -0
- package/es/business/Filter/Dropdown/style/index.d.ts +1 -0
- package/es/business/Filter/Dropdown/style/index.js +2 -0
- package/es/business/Filter/index.d.ts +2 -0
- package/es/business/Filter/index.js +3 -0
- package/es/business/Select/Network/interface.d.ts +27 -22
- package/es/business/Select/PaymentMethod/interface.d.ts +6 -2
- package/es/business/index.d.ts +1 -0
- package/es/business/index.js +2 -1
- package/es/components/Select/Select.js +3 -2
- package/es/components/Select/interface.d.ts +2 -0
- package/es/index.css +1 -1
- package/lib/business/Filter/DateRange/DateRange.d.ts +2 -0
- package/lib/business/Filter/DateRange/DateRange.js +400 -0
- package/lib/business/Filter/DateRange/index.d.ts +2 -0
- package/lib/business/Filter/DateRange/index.js +28 -0
- package/lib/business/Filter/DateRange/interface.d.ts +68 -0
- package/lib/business/Filter/DateRange/interface.js +15 -0
- package/lib/business/Filter/DateRange/style/DateRange.css +85 -0
- package/lib/business/Filter/DateRange/style/css.js +4 -0
- package/lib/business/Filter/DateRange/style/index.d.ts +1 -0
- package/lib/business/Filter/DateRange/style/index.js +4 -0
- package/lib/business/Filter/Dropdown/Dropdown.d.ts +2 -0
- package/lib/business/Filter/Dropdown/Dropdown.js +347 -0
- package/lib/business/Filter/Dropdown/index.d.ts +2 -0
- package/lib/business/Filter/Dropdown/index.js +28 -0
- package/lib/business/Filter/Dropdown/interface.d.ts +136 -0
- package/lib/business/Filter/Dropdown/interface.js +6 -0
- package/lib/business/Filter/Dropdown/style/Dropdown.css +94 -0
- package/lib/business/Filter/Dropdown/style/css.js +4 -0
- package/lib/business/Filter/Dropdown/style/index.d.ts +1 -0
- package/lib/business/Filter/Dropdown/style/index.js +4 -0
- package/lib/business/Filter/index.d.ts +2 -0
- package/lib/business/Filter/index.js +28 -0
- package/lib/business/Select/Network/interface.d.ts +27 -22
- package/lib/business/Select/PaymentMethod/interface.d.ts +6 -2
- package/lib/business/index.d.ts +1 -0
- package/lib/business/index.js +12 -1
- package/lib/components/Select/Select.js +3 -2
- package/lib/components/Select/interface.d.ts +2 -0
- package/lib/index.css +1 -1
- package/package.json +16 -1
- package/scripts/mcp-server/examples.generated.json +6 -0
- package/scripts/mcp-server/index.generated.json +12 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { SelectProps, SelectSize } from "../../../components/Select";
|
|
3
|
+
/**
|
|
4
|
+
* A single selectable row in the dropdown filter. Consumers map their raw
|
|
5
|
+
* backend list into this shape — the component renders a fixed row layout from
|
|
6
|
+
* these fields (icon + label + optional second line + optional tag + trailing
|
|
7
|
+
* checkbox) and never exposes a render slot.
|
|
8
|
+
*
|
|
9
|
+
* Which optional fields you provide drives the row's appearance:
|
|
10
|
+
* - `iconUrl` present → a leading round icon is shown.
|
|
11
|
+
* - `description` present → a muted second line is shown under `label`.
|
|
12
|
+
* - `group` present → rows are bucketed under a group heading.
|
|
13
|
+
* - `tag` present → a small badge is shown after `label`.
|
|
14
|
+
*/
|
|
15
|
+
export interface DropdownFilterOption {
|
|
16
|
+
/** Primary row text, e.g. `"Bitcoin"` / `"Sent"` / `"Yvonne Ni"`. */
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* Stable identifier echoed back through `onApply`, e.g. the asset symbol
|
|
20
|
+
* `"USDC"`, the direction `"SENT"`, or a counterparty id.
|
|
21
|
+
*/
|
|
22
|
+
value: string;
|
|
23
|
+
/**
|
|
24
|
+
* Muted second line under `label`, e.g. a network `"Solana"`, an account
|
|
25
|
+
* number, or an email. Omit for a single-line row.
|
|
26
|
+
*/
|
|
27
|
+
description?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Public URL of a leading round icon (rendered with `<img>`), e.g. an asset
|
|
30
|
+
* icon. Omit for a row with no icon.
|
|
31
|
+
*/
|
|
32
|
+
iconUrl?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Group heading this row belongs to, e.g. `"Cash"` / `"Stablecoins"`.
|
|
35
|
+
* Consecutive rows sharing a `group` render under one heading. Omit to keep
|
|
36
|
+
* the row ungrouped (no heading).
|
|
37
|
+
*/
|
|
38
|
+
group?: string;
|
|
39
|
+
/** Small trailing badge after `label`, e.g. `"Main"`. Omit for no badge. */
|
|
40
|
+
tag?: string;
|
|
41
|
+
/** Pre-select this row on mount (and on `reset`). */
|
|
42
|
+
defaultValue?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Keys of {@link DropdownFilterOption} that the search box matches against. */
|
|
45
|
+
export type DropdownFilterSearchKey = 'label' | 'description';
|
|
46
|
+
/** Imperative handle exposed via `ref` for parent-driven reset/clear. */
|
|
47
|
+
export interface DropdownFilterHandler {
|
|
48
|
+
/** Wipe the selection to empty (no rows checked) without firing callbacks. */
|
|
49
|
+
clear: () => void;
|
|
50
|
+
/** Restore the initial state (respecting `defaultSelectAll`) and fire `onReset`. */
|
|
51
|
+
reset: () => void;
|
|
52
|
+
}
|
|
53
|
+
export interface DropdownFilterProps extends Omit<SelectProps, 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange' | 'searchable' | 'searchValue' | 'defaultSearchValue' | 'onSearchChange' | 'filterOption' | 'renderOption' | 'renderOptionContent' | 'renderValue' | 'panelHeader' | 'panelFooter' | 'emptyContent' | 'open' | 'defaultOpen' | 'onOpenChange' | 'allowDeselect' | 'maxVisibleValues' | 'size' | 'onReset'> {
|
|
54
|
+
ref?: RefObject<DropdownFilterHandler | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Trigger size. Mirrors the host filter row sizing.
|
|
57
|
+
* @default 'small'
|
|
58
|
+
*/
|
|
59
|
+
size?: SelectSize;
|
|
60
|
+
/** Optional field label rendered above the trigger. */
|
|
61
|
+
label?: ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Trigger placeholder shown before any selection.
|
|
64
|
+
* @default 'Select'
|
|
65
|
+
*/
|
|
66
|
+
placeholder?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The selectable rows. Map your backend list into {@link DropdownFilterOption}.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const options: DropdownFilterOption[] = [
|
|
73
|
+
* { label: 'Bitcoin', value: 'BTC', iconUrl: 'https://…/btc.png', group: 'Stablecoins' },
|
|
74
|
+
* ];
|
|
75
|
+
* <DropdownFilter options={options} search allLabel='All assets' />
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
options: DropdownFilterOption[];
|
|
79
|
+
/**
|
|
80
|
+
* Text for the leading "select all" row, e.g. `"All assets"`. When provided,
|
|
81
|
+
* an exclusive "All" row is rendered above the options; selecting it clears
|
|
82
|
+
* every specific selection (`onApply` receives `[]`). Omit to render no
|
|
83
|
+
* "All" row (e.g. the recipient filter).
|
|
84
|
+
*/
|
|
85
|
+
allLabel?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Start with everything selected (the "All" row checked, `value = []`). Also
|
|
88
|
+
* the state `reset` returns to. Only meaningful together with `allLabel`.
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
defaultSelectAll?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Show a search box above the list.
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
search?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Placeholder for the search box.
|
|
99
|
+
* @default 'Search'
|
|
100
|
+
*/
|
|
101
|
+
searchPlaceholder?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Which option fields the search box matches against.
|
|
104
|
+
* @default ['label', 'description']
|
|
105
|
+
*/
|
|
106
|
+
searchKeys?: DropdownFilterSearchKey[];
|
|
107
|
+
/**
|
|
108
|
+
* Content shown when the list is empty (no options, or a search with no
|
|
109
|
+
* matches). Pass a node to fully customize it — e.g. a different icon and
|
|
110
|
+
* copy. Defaults to an `<Empty icon='search' title='No results' />`.
|
|
111
|
+
* @example
|
|
112
|
+
* ```tsx
|
|
113
|
+
* searchEmpty={
|
|
114
|
+
* <Empty icon='id' title='No recipients found'
|
|
115
|
+
* description='Try a different name or adjust your search filters.' />
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
searchEmpty?: ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Fired when the user commits the selection via the panel's Apply button.
|
|
122
|
+
* Receives the selected `value`s, or `[]` for "all / nothing" — the component
|
|
123
|
+
* never injects an `'all'` sentinel, so translate `[]` to whatever your API
|
|
124
|
+
* expects (omit the field, `['ALL']`, etc.) at the call site.
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* <DropdownFilter
|
|
128
|
+
* options={assets}
|
|
129
|
+
* onApply={(values) => setAssetName(values.length ? values : undefined)}
|
|
130
|
+
* />
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
onApply: (values: string[]) => void;
|
|
134
|
+
/** Fired when the user clears the selection via the panel's Reset button. */
|
|
135
|
+
onReset?: (values: string[]) => void;
|
|
136
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVzaW5lc3MvRmlsdGVyL0Ryb3Bkb3duL2ludGVyZmFjZS5qcyIsIm5hbWVzIjpbXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyIsInNvdXJjZXMiOlsiYnVzaW5lc3MvRmlsdGVyL0Ryb3Bkb3duL2ludGVyZmFjZS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge307Il0sIm1hcHBpbmdzIjoiIiwiaWdub3JlTGlzdCI6W119
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the spacing value for a given token key.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} $key - The spacing token key (e.g., '100', '200').
|
|
5
|
+
* @return {length|null} The computed spacing value or null if the key is invalid.
|
|
6
|
+
* @example
|
|
7
|
+
* .element {
|
|
8
|
+
* padding: om-spacing-token('200'); // Returns 8px if $om-sys-spacing-unit is 4px
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Computes the spacing value based on a token key or a direct length value.
|
|
13
|
+
*
|
|
14
|
+
* @param {string|length} $value - The spacing token key (e.g., '100') or a direct length value (e.g., '16px').
|
|
15
|
+
* @return {length} The computed spacing value.
|
|
16
|
+
* @example
|
|
17
|
+
* .element {
|
|
18
|
+
* margin: om-spacing-value('300'); // Returns 12px if $om-sys-spacing-unit is 4px
|
|
19
|
+
* padding: om-spacing-value(16px); // Returns 16px
|
|
20
|
+
* gap: om-spacing-value(2); // Returns 8px if $om-sys-spacing-unit is 4px
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
.om-dropdown-filter__value {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
width: 100%;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
line-height: 18px;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
}
|
|
32
|
+
.om-dropdown-filter__value-more {
|
|
33
|
+
flex: 0 0 auto;
|
|
34
|
+
margin-left: var(--om-spacing-100, 4px);
|
|
35
|
+
color: var(--om-text-default-tertiary, #646465);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.om-dropdown-filter-panel {
|
|
39
|
+
min-width: 224px;
|
|
40
|
+
}
|
|
41
|
+
.om-dropdown-filter-panel .om-component-ui-select-panel-header {
|
|
42
|
+
margin-bottom: var(--om-spacing-050, 2px);
|
|
43
|
+
}
|
|
44
|
+
.om-dropdown-filter-panel .om-dropdown-filter__group-label {
|
|
45
|
+
padding-top: var(--om-spacing-200, 8px);
|
|
46
|
+
padding-bottom: var(--om-spacing-050, 2px);
|
|
47
|
+
}
|
|
48
|
+
.om-dropdown-filter-panel .om-dropdown-filter__group-label [class*=om-component-ui-typography] {
|
|
49
|
+
font-size: var(--om-body-sm-font-size);
|
|
50
|
+
font-family: var(--om-body-sm-font-family);
|
|
51
|
+
line-height: var(--om-body-sm-line-height);
|
|
52
|
+
letter-spacing: var(--om-body-sm-letter-spacing);
|
|
53
|
+
font-weight: var(--om-body-sm-strong-font-weight);
|
|
54
|
+
color: var(--om-text-default-tertiary, #646465);
|
|
55
|
+
}
|
|
56
|
+
.om-dropdown-filter-panel .om-dropdown-filter__row {
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
.om-dropdown-filter-panel .om-dropdown-filter__row-main {
|
|
60
|
+
min-width: 0;
|
|
61
|
+
}
|
|
62
|
+
.om-dropdown-filter-panel .om-dropdown-filter__row-text {
|
|
63
|
+
min-width: 0;
|
|
64
|
+
}
|
|
65
|
+
.om-dropdown-filter-panel .om-dropdown-filter__row-label {
|
|
66
|
+
min-width: 0;
|
|
67
|
+
}
|
|
68
|
+
.om-dropdown-filter-panel .om-dropdown-filter__row-check {
|
|
69
|
+
flex: 0 0 auto;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
}
|
|
72
|
+
.om-dropdown-filter-panel .om-dropdown-filter__all {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: space-between;
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding: var(--om-spacing-200, 8px);
|
|
78
|
+
border: none;
|
|
79
|
+
background: transparent;
|
|
80
|
+
border-radius: var(--om-radius-200, 8px);
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
.om-dropdown-filter-panel .om-dropdown-filter__all:hover, .om-dropdown-filter-panel .om-dropdown-filter__all--checked {
|
|
84
|
+
background: var(--om-bg-default-secondary, #f8f8f8);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.om-dropdown-filter-icon {
|
|
88
|
+
flex: 0 0 auto;
|
|
89
|
+
width: 24px;
|
|
90
|
+
height: 24px;
|
|
91
|
+
-o-object-fit: cover;
|
|
92
|
+
object-fit: cover;
|
|
93
|
+
border-radius: var(--om-radius-full, 9999px);
|
|
94
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("./Dropdown.css");
|
|
4
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1c2luZXNzL0ZpbHRlci9Ecm9wZG93bi9zcmMvYnVzaW5lc3MvRmlsdGVyL0Ryb3Bkb3duL3N0eWxlL2luZGV4LnRzIl0sIm5hbWVzIjpbInJlcXVpcmUiXSwibWFwcGluZ3MiOiI7O0FBQUFBLE9BQUEiLCJmaWxlIjoiYnVzaW5lc3MvRmlsdGVyL0Ryb3Bkb3duL3N0eWxlL2Nzcy5qcyIsInNvdXJjZXNDb250ZW50IjpbbnVsbF0sInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './Dropdown.css';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("./Dropdown.css");
|
|
4
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1c2luZXNzL0ZpbHRlci9Ecm9wZG93bi9zcmMvYnVzaW5lc3MvRmlsdGVyL0Ryb3Bkb3duL3N0eWxlL2luZGV4LnRzIl0sIm5hbWVzIjpbInJlcXVpcmUiXSwibWFwcGluZ3MiOiI7O0FBQUFBLE9BQUEiLCJmaWxlIjoiYnVzaW5lc3MvRmlsdGVyL0Ryb3Bkb3duL3N0eWxlL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOltudWxsXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _DateRange = require("./DateRange");
|
|
7
|
+
Object.keys(_DateRange).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _DateRange[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _DateRange[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _Dropdown = require("./Dropdown");
|
|
18
|
+
Object.keys(_Dropdown).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _Dropdown[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _Dropdown[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1c2luZXNzL3NyYy9idXNpbmVzcy9GaWx0ZXIvaW5kZXgudHMiXSwibmFtZXMiOlsiX0RhdGVSYW5nZSIsInJlcXVpcmUiLCJPYmplY3QiLCJrZXlzIiwiZm9yRWFjaCIsImtleSIsImV4cG9ydHMiLCJkZWZpbmVQcm9wZXJ0eSIsImVudW1lcmFibGUiLCJnZXQiLCJfRHJvcGRvd24iXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsSUFBQUEsVUFBQSxHQUFBQyxPQUFBO0FBQUFDLE1BQUEsQ0FBQUMsSUFBQSxDQUFBSCxVQUFBLEVBQUFJLE9BQUEsV0FBQUMsR0FBQTtFQUFBLElBQUFBLEdBQUEsa0JBQUFBLEdBQUE7RUFBQSxJQUFBQSxHQUFBLElBQUFDLE9BQUEsSUFBQUEsT0FBQSxDQUFBRCxHQUFBLE1BQUFMLFVBQUEsQ0FBQUssR0FBQTtFQUFBSCxNQUFBLENBQUFLLGNBQUEsQ0FBQUQsT0FBQSxFQUFBRCxHQUFBO0lBQUFHLFVBQUE7SUFBQUMsR0FBQSxXQUFBQSxJQUFBO01BQUEsT0FBQVQsVUFBQSxDQUFBSyxHQUFBO0lBQUE7RUFBQTtBQUFBO0FBQ0EsSUFBQUssU0FBQSxHQUFBVCxPQUFBO0FBQUFDLE1BQUEsQ0FBQUMsSUFBQSxDQUFBTyxTQUFBLEVBQUFOLE9BQUEsV0FBQUMsR0FBQTtFQUFBLElBQUFBLEdBQUEsa0JBQUFBLEdBQUE7RUFBQSxJQUFBQSxHQUFBLElBQUFDLE9BQUEsSUFBQUEsT0FBQSxDQUFBRCxHQUFBLE1BQUFLLFNBQUEsQ0FBQUwsR0FBQTtFQUFBSCxNQUFBLENBQUFLLGNBQUEsQ0FBQUQsT0FBQSxFQUFBRCxHQUFBO0lBQUFHLFVBQUE7SUFBQUMsR0FBQSxXQUFBQSxJQUFBO01BQUEsT0FBQUMsU0FBQSxDQUFBTCxHQUFBO0lBQUE7RUFBQTtBQUFBIiwiZmlsZSI6ImJ1c2luZXNzL0ZpbHRlci9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbbnVsbF0sInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMifQ==
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { SelectProps } from "../../../components/Select";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* A crypto network entry for the selector.
|
|
4
|
+
*
|
|
5
|
+
* `network`, `networkDesc`, and `iconUrl` are always required (identity +
|
|
6
|
+
* display). The remaining fields are deposit-only metadata from
|
|
7
|
+
* `/private/currencies` (`data.crypto[i].networks[j]`) and are optional, so a
|
|
8
|
+
* withdraw-side network list — which carries only `network`/`networkDesc`/
|
|
9
|
+
* `iconUrl` — can be passed through as-is without casting or filling in dummies.
|
|
10
|
+
* The component itself only reads `network`, `networkDesc`, `iconUrl`, and
|
|
11
|
+
* `txLatency`.
|
|
7
12
|
*/
|
|
8
13
|
export interface NetworkItem {
|
|
9
14
|
/** Network identifier — bound to the select value (not displayed), e.g. `"ETHEREUM"` / `"POLYGON"`. */
|
|
@@ -12,26 +17,26 @@ export interface NetworkItem {
|
|
|
12
17
|
networkDesc: string;
|
|
13
18
|
/** Public URL of the network icon. */
|
|
14
19
|
iconUrl: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
|
|
20
|
+
/** Human-readable latency shown on the right of each option, e.g. `"3 mins"` / `"Hours"`. Blank when absent. */
|
|
21
|
+
txLatency?: string;
|
|
22
|
+
/** Smart-contract address of the asset on this network. May be `""` for native chains. Deposit-only. */
|
|
23
|
+
contractAddress?: string;
|
|
24
|
+
/** Block-explorer URL for `contractAddress`. Deposit-only. */
|
|
25
|
+
contractAddressUrl?: string;
|
|
26
|
+
/** Minimum deposit amount in the parent asset, e.g. `"0.1"`. Deposit-only. */
|
|
27
|
+
depositMin?: string;
|
|
28
|
+
/** Number of confirmations required before the deposit is credited, e.g. `12`. Deposit-only. */
|
|
29
|
+
minConfirm?: number;
|
|
30
|
+
/** Estimated processing time in minutes, e.g. `4`. Deposit-only. */
|
|
31
|
+
processingTime?: number;
|
|
27
32
|
/** Badge label, e.g. `"Recommended"` / `"Delayed"`; `""` when none. Not rendered yet. */
|
|
28
|
-
tag
|
|
33
|
+
tag?: string;
|
|
29
34
|
/** Badge status code: `0` none, `1` recommended, `2` delayed. Not rendered yet. */
|
|
30
|
-
tagStatus
|
|
31
|
-
/** Deposit address for this network. */
|
|
32
|
-
address
|
|
33
|
-
/** Display order within the list, e.g. `0`. */
|
|
34
|
-
order
|
|
35
|
+
tagStatus?: number;
|
|
36
|
+
/** Deposit address for this network. Deposit-only. */
|
|
37
|
+
address?: string;
|
|
38
|
+
/** Display order within the list, e.g. `0`. Deposit-only. */
|
|
39
|
+
order?: number;
|
|
35
40
|
}
|
|
36
41
|
export interface NetworkSelectProps extends Omit<SelectProps, 'options' | 'value' | 'defaultValue' | 'onChange' | 'multiple' | 'renderOption' | 'renderOptionContent' | 'renderValue' | 'panelHeader' | 'panelFooter'> {
|
|
37
42
|
/**
|
|
@@ -30,8 +30,12 @@ export interface PaymentMethodItem {
|
|
|
30
30
|
depositAmtMin?: string;
|
|
31
31
|
/** Minimum withdrawal amount, as a numeric string. */
|
|
32
32
|
withdrawAmtMin?: string;
|
|
33
|
-
/**
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Fee + settlement info. `undefined` / `null` both mean "no configured fee"
|
|
35
|
+
* — the backend may send an explicit `null`, and the component guards with
|
|
36
|
+
* optional chaining / `!= null`, so callers can pass the raw payload as-is.
|
|
37
|
+
*/
|
|
38
|
+
fee?: PaymentMethodFee | null;
|
|
35
39
|
}
|
|
36
40
|
export interface PaymentMethodSelectProps extends Omit<SelectProps, 'options' | 'renderValue' | 'renderOption' | 'renderOptionContent'> {
|
|
37
41
|
/**
|
package/lib/business/index.d.ts
CHANGED
package/lib/business/index.js
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _Filter = require("./Filter");
|
|
7
|
+
Object.keys(_Filter).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Filter[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _Filter[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _Select = require("./Select");
|
|
7
18
|
Object.keys(_Select).forEach(function (key) {
|
|
8
19
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -14,4 +25,4 @@ Object.keys(_Select).forEach(function (key) {
|
|
|
14
25
|
}
|
|
15
26
|
});
|
|
16
27
|
});
|
|
17
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9idXNpbmVzcy9pbmRleC50cyJdLCJuYW1lcyI6WyJfRmlsdGVyIiwicmVxdWlyZSIsIk9iamVjdCIsImtleXMiLCJmb3JFYWNoIiwia2V5IiwiZXhwb3J0cyIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYWJsZSIsImdldCIsIl9TZWxlY3QiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsSUFBQUEsT0FBQSxHQUFBQyxPQUFBO0FBQUFDLE1BQUEsQ0FBQUMsSUFBQSxDQUFBSCxPQUFBLEVBQUFJLE9BQUEsV0FBQUMsR0FBQTtFQUFBLElBQUFBLEdBQUEsa0JBQUFBLEdBQUE7RUFBQSxJQUFBQSxHQUFBLElBQUFDLE9BQUEsSUFBQUEsT0FBQSxDQUFBRCxHQUFBLE1BQUFMLE9BQUEsQ0FBQUssR0FBQTtFQUFBSCxNQUFBLENBQUFLLGNBQUEsQ0FBQUQsT0FBQSxFQUFBRCxHQUFBO0lBQUFHLFVBQUE7SUFBQUMsR0FBQSxXQUFBQSxJQUFBO01BQUEsT0FBQVQsT0FBQSxDQUFBSyxHQUFBO0lBQUE7RUFBQTtBQUFBO0FBQ0EsSUFBQUssT0FBQSxHQUFBVCxPQUFBO0FBQUFDLE1BQUEsQ0FBQUMsSUFBQSxDQUFBTyxPQUFBLEVBQUFOLE9BQUEsV0FBQUMsR0FBQTtFQUFBLElBQUFBLEdBQUEsa0JBQUFBLEdBQUE7RUFBQSxJQUFBQSxHQUFBLElBQUFDLE9BQUEsSUFBQUEsT0FBQSxDQUFBRCxHQUFBLE1BQUFLLE9BQUEsQ0FBQUwsR0FBQTtFQUFBSCxNQUFBLENBQUFLLGNBQUEsQ0FBQUQsT0FBQSxFQUFBRCxHQUFBO0lBQUFHLFVBQUE7SUFBQUMsR0FBQSxXQUFBQSxJQUFBO01BQUEsT0FBQUMsT0FBQSxDQUFBTCxHQUFBO0lBQUE7RUFBQTtBQUFBIiwiZmlsZSI6ImJ1c2luZXNzL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOltudWxsXSwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYyJ9
|