@stellar-expert/ui-framework 1.21.1 → 1.21.2
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/account/account-address.js +6 -6
- package/account/signer-key.js +1 -1
- package/api/explorer-api-hooks.js +4 -4
- package/api/explorer-api-paginated-list-hooks.js +4 -4
- package/api/explorer-tx-api.js +3 -3
- package/api/ledger-stream.js +2 -2
- package/asset/amount.js +2 -2
- package/asset/asset-icon.js +2 -2
- package/asset/asset-issuer.js +2 -2
- package/asset/asset-link.js +6 -6
- package/asset/asset-list-hooks.js +3 -3
- package/asset/asset-meta-hooks.js +3 -3
- package/asset/asset-selector.js +3 -3
- package/charts/axis/axis.js +3 -3
- package/charts/axis/tick-positioner.js +1 -1
- package/charts/chart-default-options.js +1 -1
- package/charts/chart-options-builder.js +2 -2
- package/charts/chart.js +5 -5
- package/charts/core/animate.js +1 -1
- package/charts/core/chart.js +13 -13
- package/charts/core/options.js +1 -1
- package/charts/globals.js +5 -5
- package/charts/index.js +2 -2
- package/charts/interaction/tooltip.js +2 -2
- package/charts/pie/pie-chart.js +2 -2
- package/charts/polar/polar-chart.js +2 -2
- package/charts/series/area-series.js +3 -3
- package/charts/series/candlestick-series.js +2 -2
- package/charts/series/column-series.js +3 -3
- package/charts/series/index.js +4 -4
- package/charts/series/line-series.js +3 -3
- package/charts/series/series.js +1 -1
- package/charts/stock/data-grouping.js +1 -1
- package/charts/stock/navigator.js +3 -3
- package/charts/stock/range-selector.js +1 -1
- package/claimable-balance/claimable-balance-claimants.js +2 -2
- package/claimable-balance/claimable-balance-id.js +1 -1
- package/contract/contract-api.js +2 -2
- package/contract/invocation-info-view.js +6 -6
- package/contract/sc-val.js +1 -1
- package/controls/dropdown.js +1 -1
- package/controls/info-tooltip.js +1 -1
- package/controls/tabs.js +1 -1
- package/controls/update-highlighter.js +1 -1
- package/date/utc-timestamp.js +28 -28
- package/directory/directory-hooks.js +2 -2
- package/effect/effect-description.js +9 -9
- package/effect/op-effects-view.js +57 -57
- package/errors/error-boundary.js +1 -1
- package/filter/editors/account-filter-view.js +2 -2
- package/filter/editors/asset-filter-view.js +2 -2
- package/filter/editors/timestamp-filter-view.js +3 -3
- package/filter/editors/type-filter-view.js +1 -1
- package/filter/filter-editors.js +6 -6
- package/filter/filter-view.js +2 -2
- package/horizon/horizon-account-helpers.js +1 -1
- package/horizon/horizon-ledger-helpers.js +1 -1
- package/horizon/horizon-orderbook-helpers.js +14 -14
- package/horizon/horizon-trades-helper.js +1 -1
- package/horizon/horizon-transaction-helpers.js +1 -1
- package/index.js +73 -73
- package/interaction/system-dialog.js +2 -2
- package/interaction/theme-selector.js +1 -1
- package/ledger/ledger-entry-href-formatter.js +1 -1
- package/ledger/ledger-entry-link.js +2 -2
- package/module/dynamic-module.js +1 -1
- package/package.json +2 -3
- package/state/page-visibility-hooks.js +1 -1
- package/toast/toast-notifications-block.js +2 -2
- package/tx/op-accounting-changes.js +26 -26
- package/tx/op-description-view.js +13 -13
- package/tx/parser/tx-details-parser.js +2 -2
- package/tx/parser/tx-matcher.js +1 -1
- package/tx/tx-fee-effect.js +13 -13
- package/tx/tx-list-hooks.js +2 -2
- package/tx/tx-operations-list.js +6 -6
|
@@ -3,15 +3,15 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import {AuthRequiredFlag, AuthRevocableFlag, AuthImmutableFlag, AuthClawbackEnabledFlag} from '@stellar/stellar-sdk'
|
|
4
4
|
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
5
5
|
import {shortenString, formatWithAutoPrecision} from '@stellar-expert/formatter'
|
|
6
|
-
import {CopyToClipboard} from '../interaction/copy-to-clipboard
|
|
7
|
-
import {AccountAddress} from '../account/account-address
|
|
8
|
-
import {ClaimableBalanceId} from '../claimable-balance/claimable-balance-id
|
|
9
|
-
import InvocationInfoView from '../contract/invocation-info-view
|
|
10
|
-
import {ScVal} from '../contract/sc-val
|
|
11
|
-
import {SignerKey} from '../account/signer-key
|
|
12
|
-
import {OfferLink} from '../ledger/ledger-entry-link
|
|
13
|
-
import {AssetLink} from '../asset/asset-link
|
|
14
|
-
import {Amount} from '../asset/amount
|
|
6
|
+
import {CopyToClipboard} from '../interaction/copy-to-clipboard'
|
|
7
|
+
import {AccountAddress} from '../account/account-address'
|
|
8
|
+
import {ClaimableBalanceId} from '../claimable-balance/claimable-balance-id'
|
|
9
|
+
import InvocationInfoView from '../contract/invocation-info-view'
|
|
10
|
+
import {ScVal} from '../contract/sc-val'
|
|
11
|
+
import {SignerKey} from '../account/signer-key'
|
|
12
|
+
import {OfferLink} from '../ledger/ledger-entry-link'
|
|
13
|
+
import {AssetLink} from '../asset/asset-link'
|
|
14
|
+
import {Amount} from '../asset/amount'
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Renders a human-readable description of a Stellar transaction effect
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import cn from 'classnames'
|
|
3
|
-
import {EffectDescription} from './effect-description
|
|
4
|
-
import SorobanTxMetricsView from './soroban-tx-metrics-view
|
|
5
|
-
import './op-effects.scss'
|
|
6
|
-
|
|
7
|
-
export function OpEffectsView({operation}) {
|
|
8
|
-
const effects = getEffects(operation)
|
|
9
|
-
if (!effects.length)
|
|
10
|
-
return <div className="op-effects">
|
|
11
|
-
<div className="dimmed">(no effects)</div>
|
|
12
|
-
</div>
|
|
13
|
-
return <div className="op-effects">
|
|
14
|
-
{effects.map((e, i) => {
|
|
15
|
-
if (e.type === 'contractMetrics')
|
|
16
|
-
return null
|
|
17
|
-
return <div key={i}>
|
|
18
|
-
<i className={cn('effect-icon', e.type === 'contractError' ? 'icon-warning' : 'icon-puzzle')}/> 
|
|
19
|
-
<EffectDescription effect={e} operation={operation}/>
|
|
20
|
-
</div>
|
|
21
|
-
})}
|
|
22
|
-
<SorobanTxMetricsView metrics={effects.find(e => e.type === 'contractMetrics')}/>
|
|
23
|
-
</div>
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function getEffects(op) {
|
|
27
|
-
let {effects} = op.operation
|
|
28
|
-
if (op.operation.type === 'invokeHostFunction')
|
|
29
|
-
return sortContractEffects([...effects])
|
|
30
|
-
return effects
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function sortContractEffects(effects) {
|
|
34
|
-
effects.sort((a, b) => {
|
|
35
|
-
const aInvocation = a.type === 'contractInvoked'
|
|
36
|
-
const bInvocation = b.type === 'contractInvoked'
|
|
37
|
-
if (aInvocation && bInvocation)
|
|
38
|
-
return 0
|
|
39
|
-
if (!aInvocation && !bInvocation) {
|
|
40
|
-
const aData = a.type === 'setTtl' || a.type.startsWith('contractData')
|
|
41
|
-
const bData = b.type === 'setTtl' || b.type.startsWith('contractData')
|
|
42
|
-
if (aData === bData) {
|
|
43
|
-
if (a.type === 'setTtl')
|
|
44
|
-
return 1
|
|
45
|
-
if (b.type === 'setTtl')
|
|
46
|
-
return -1
|
|
47
|
-
if (a.durability === 'instance' && a.durability !== b.durability)
|
|
48
|
-
return -1
|
|
49
|
-
if (b.durability === 'instance' && a.durability !== b.durability)
|
|
50
|
-
return 1
|
|
51
|
-
return 0
|
|
52
|
-
}
|
|
53
|
-
return aData ? 1 : -1
|
|
54
|
-
}
|
|
55
|
-
return aInvocation ? -1 : 1
|
|
56
|
-
})
|
|
57
|
-
return effects
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import cn from 'classnames'
|
|
3
|
+
import {EffectDescription} from './effect-description'
|
|
4
|
+
import SorobanTxMetricsView from './soroban-tx-metrics-view'
|
|
5
|
+
import './op-effects.scss'
|
|
6
|
+
|
|
7
|
+
export function OpEffectsView({operation}) {
|
|
8
|
+
const effects = getEffects(operation)
|
|
9
|
+
if (!effects.length)
|
|
10
|
+
return <div className="op-effects">
|
|
11
|
+
<div className="dimmed">(no effects)</div>
|
|
12
|
+
</div>
|
|
13
|
+
return <div className="op-effects">
|
|
14
|
+
{effects.map((e, i) => {
|
|
15
|
+
if (e.type === 'contractMetrics')
|
|
16
|
+
return null
|
|
17
|
+
return <div key={i}>
|
|
18
|
+
<i className={cn('effect-icon', e.type === 'contractError' ? 'icon-warning' : 'icon-puzzle')}/> 
|
|
19
|
+
<EffectDescription effect={e} operation={operation}/>
|
|
20
|
+
</div>
|
|
21
|
+
})}
|
|
22
|
+
<SorobanTxMetricsView metrics={effects.find(e => e.type === 'contractMetrics')}/>
|
|
23
|
+
</div>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getEffects(op) {
|
|
27
|
+
let {effects} = op.operation
|
|
28
|
+
if (op.operation.type === 'invokeHostFunction')
|
|
29
|
+
return sortContractEffects([...effects])
|
|
30
|
+
return effects
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function sortContractEffects(effects) {
|
|
34
|
+
effects.sort((a, b) => {
|
|
35
|
+
const aInvocation = a.type === 'contractInvoked'
|
|
36
|
+
const bInvocation = b.type === 'contractInvoked'
|
|
37
|
+
if (aInvocation && bInvocation)
|
|
38
|
+
return 0
|
|
39
|
+
if (!aInvocation && !bInvocation) {
|
|
40
|
+
const aData = a.type === 'setTtl' || a.type.startsWith('contractData')
|
|
41
|
+
const bData = b.type === 'setTtl' || b.type.startsWith('contractData')
|
|
42
|
+
if (aData === bData) {
|
|
43
|
+
if (a.type === 'setTtl')
|
|
44
|
+
return 1
|
|
45
|
+
if (b.type === 'setTtl')
|
|
46
|
+
return -1
|
|
47
|
+
if (a.durability === 'instance' && a.durability !== b.durability)
|
|
48
|
+
return -1
|
|
49
|
+
if (b.durability === 'instance' && a.durability !== b.durability)
|
|
50
|
+
return 1
|
|
51
|
+
return 0
|
|
52
|
+
}
|
|
53
|
+
return aData ? 1 : -1
|
|
54
|
+
}
|
|
55
|
+
return aInvocation ? -1 : 1
|
|
56
|
+
})
|
|
57
|
+
return effects
|
|
58
58
|
}
|
package/errors/error-boundary.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import {navigation as nav} from '@stellar-expert/navigation'
|
|
4
|
-
import {BlockSelect} from '../interaction/block-select
|
|
4
|
+
import {BlockSelect} from '../interaction/block-select'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* React error boundary that catches rendering errors and displays a fallback UI
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useCallback, useState} from 'react'
|
|
2
2
|
import {StrKey} from '@stellar/stellar-sdk'
|
|
3
|
-
import {AccountAddress} from '../../account/account-address
|
|
4
|
-
import {useAutoFocusRef} from '../../interaction/autofocus
|
|
3
|
+
import {AccountAddress} from '../../account/account-address'
|
|
4
|
+
import {useAutoFocusRef} from '../../interaction/autofocus'
|
|
5
5
|
|
|
6
6
|
export function AccountEditor({value, setValue}) {
|
|
7
7
|
const [internalValue, setInternalValue] = useState(value || '')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {AssetLink} from '../../asset/asset-link
|
|
3
|
-
import {AssetSelector} from '../../asset/asset-selector
|
|
2
|
+
import {AssetLink} from '../../asset/asset-link'
|
|
3
|
+
import {AssetSelector} from '../../asset/asset-selector'
|
|
4
4
|
|
|
5
5
|
export function AssetEditor({value, setValue}) {
|
|
6
6
|
if (!setValue)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useCallback, useState} from 'react'
|
|
2
|
-
import {UtcTimestamp} from '../../date/utc-timestamp
|
|
3
|
-
import {DateSelector} from '../../date/date-selector
|
|
4
|
-
import {useAutoFocusRef} from '../../interaction/autofocus
|
|
2
|
+
import {UtcTimestamp} from '../../date/utc-timestamp'
|
|
3
|
+
import {DateSelector} from '../../date/date-selector'
|
|
4
|
+
import {useAutoFocusRef} from '../../interaction/autofocus'
|
|
5
5
|
|
|
6
6
|
export function TimestampEditor({value, setValue, edit}) {
|
|
7
7
|
value = parseInt(value, 10)
|
package/filter/filter-editors.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, {useCallback, useState} from 'react'
|
|
2
2
|
import {StrKey} from '@stellar/stellar-sdk'
|
|
3
3
|
import {shortenString} from '@stellar-expert/formatter'
|
|
4
|
-
import {AssetLink} from '../asset/asset-link
|
|
5
|
-
import {useAutoFocusRef} from '../interaction/autofocus
|
|
6
|
-
import {OperationTypeEditor} from './editors/type-filter-view
|
|
7
|
-
import {AssetEditor} from './editors/asset-filter-view
|
|
8
|
-
import {AccountEditor} from './editors/account-filter-view
|
|
9
|
-
import {TimestampEditor} from './editors/timestamp-filter-view
|
|
4
|
+
import {AssetLink} from '../asset/asset-link'
|
|
5
|
+
import {useAutoFocusRef} from '../interaction/autofocus'
|
|
6
|
+
import {OperationTypeEditor} from './editors/type-filter-view'
|
|
7
|
+
import {AssetEditor} from './editors/asset-filter-view'
|
|
8
|
+
import {AccountEditor} from './editors/account-filter-view'
|
|
9
|
+
import {TimestampEditor} from './editors/timestamp-filter-view'
|
|
10
10
|
|
|
11
11
|
export function TextEditor({value, setValue, mask}) {
|
|
12
12
|
const [internalValue, setInternalValue] = useState(value || '')
|
package/filter/filter-view.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, {useCallback, useEffect, useState} from 'react'
|
|
2
2
|
import {navigation, parseQuery} from '@stellar-expert/navigation'
|
|
3
3
|
import deepmerge from 'deepmerge'
|
|
4
|
-
import {Dropdown} from '../controls/dropdown
|
|
5
|
-
import {resolveFilterEditor} from './filter-editors
|
|
4
|
+
import {Dropdown} from '../controls/dropdown'
|
|
5
|
+
import {resolveFilterEditor} from './filter-editors'
|
|
6
6
|
import './filter.scss'
|
|
7
7
|
|
|
8
8
|
let fieldDescriptionMapping = {}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
2
|
-
import {applyListQueryParameters, initHorizon} from './horizon-client-helpers
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Load orderbook for assets.
|
|
6
|
-
* @param {object} selling - Selling asset.
|
|
7
|
-
* @param {object} buying - Buying asset.
|
|
8
|
-
* @param {ListQueryParams} [queryParams] - Query parameters (optional).
|
|
9
|
-
* @return {Promise<Array<object>>}
|
|
10
|
-
*/
|
|
11
|
-
export function loadOrderbook(selling, buying, queryParams = null) {
|
|
12
|
-
const query = applyListQueryParameters(initHorizon().orderbook(AssetDescriptor.parse(selling).toAsset(), AssetDescriptor.parse(buying).toAsset()), queryParams)
|
|
13
|
-
return query.call()
|
|
14
|
-
}
|
|
1
|
+
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
2
|
+
import {applyListQueryParameters, initHorizon} from './horizon-client-helpers'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Load orderbook for assets.
|
|
6
|
+
* @param {object} selling - Selling asset.
|
|
7
|
+
* @param {object} buying - Buying asset.
|
|
8
|
+
* @param {ListQueryParams} [queryParams] - Query parameters (optional).
|
|
9
|
+
* @return {Promise<Array<object>>}
|
|
10
|
+
*/
|
|
11
|
+
export function loadOrderbook(selling, buying, queryParams = null) {
|
|
12
|
+
const query = applyListQueryParameters(initHorizon().orderbook(AssetDescriptor.parse(selling).toAsset(), AssetDescriptor.parse(buying).toAsset()), queryParams)
|
|
13
|
+
return query.call()
|
|
14
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
2
|
-
import {initHorizon, applyListQueryParameters} from './horizon-client-helpers
|
|
2
|
+
import {initHorizon, applyListQueryParameters} from './horizon-client-helpers'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Load offer from Horizon for the particular account
|
package/index.js
CHANGED
|
@@ -5,93 +5,93 @@ window.explorerApiOrigin = window.explorerApiOrigin || 'https://api.stellar.expe
|
|
|
5
5
|
window.horizonOrigin = window.horizonOrigin || 'https://horizon.stellar.org'
|
|
6
6
|
|
|
7
7
|
//modules
|
|
8
|
-
export * from './module/dynamic-module
|
|
8
|
+
export * from './module/dynamic-module'
|
|
9
9
|
//state management and utils
|
|
10
|
-
export * from './state/state-hooks
|
|
11
|
-
export * from './state/on-screen-hooks
|
|
12
|
-
export * from './state/stellar-network-hooks
|
|
13
|
-
export * from './state/screen-orientation-hooks
|
|
14
|
-
export * from './state/page-visibility-helpers
|
|
15
|
-
export * from './state/theme
|
|
16
|
-
export * from './meta/page-meta-tags
|
|
10
|
+
export * from './state/state-hooks'
|
|
11
|
+
export * from './state/on-screen-hooks'
|
|
12
|
+
export * from './state/stellar-network-hooks'
|
|
13
|
+
export * from './state/screen-orientation-hooks'
|
|
14
|
+
export * from './state/page-visibility-helpers'
|
|
15
|
+
export * from './state/theme'
|
|
16
|
+
export * from './meta/page-meta-tags'
|
|
17
17
|
//explorer API bindings
|
|
18
|
-
export * from './api/explorer-api-hooks
|
|
19
|
-
export * from './api/explorer-api-paginated-list-hooks
|
|
20
|
-
export * from './api/explorer-tx-api
|
|
21
|
-
export * from './api/explorer-batch-info-loader
|
|
22
|
-
export * from './api/ledger-stream
|
|
18
|
+
export * from './api/explorer-api-hooks'
|
|
19
|
+
export * from './api/explorer-api-paginated-list-hooks'
|
|
20
|
+
export * from './api/explorer-tx-api'
|
|
21
|
+
export * from './api/explorer-batch-info-loader'
|
|
22
|
+
export * from './api/ledger-stream'
|
|
23
23
|
//Horizon API binding and utils
|
|
24
|
-
export * from './stellar/ledger-generic-id
|
|
25
|
-
export * from './horizon/horizon-client-helpers
|
|
26
|
-
export * from './horizon/horizon-ledger-helpers
|
|
27
|
-
export * from './horizon/horizon-transaction-helpers
|
|
28
|
-
export * from './horizon/horizon-account-helpers
|
|
29
|
-
export * from './horizon/horizon-orderbook-helpers
|
|
30
|
-
export * from './horizon/horizon-trades-helper
|
|
24
|
+
export * from './stellar/ledger-generic-id'
|
|
25
|
+
export * from './horizon/horizon-client-helpers'
|
|
26
|
+
export * from './horizon/horizon-ledger-helpers'
|
|
27
|
+
export * from './horizon/horizon-transaction-helpers'
|
|
28
|
+
export * from './horizon/horizon-account-helpers'
|
|
29
|
+
export * from './horizon/horizon-orderbook-helpers'
|
|
30
|
+
export * from './horizon/horizon-trades-helper'
|
|
31
31
|
//basic UI controls
|
|
32
|
-
export * from './controls/button
|
|
33
|
-
export * from './controls/button-group
|
|
34
|
-
export * from './controls/info-tooltip
|
|
35
|
-
export * from './controls/tooltip
|
|
36
|
-
export * from './controls/update-highlighter
|
|
37
|
-
export * from './controls/tabs
|
|
38
|
-
export * from './controls/dropdown
|
|
39
|
-
export * from './controls/code-block
|
|
40
|
-
export * from './controls/slider
|
|
41
|
-
export * from './controls/external-link
|
|
42
|
-
export * from './toast/toast-notifications-block
|
|
43
|
-
export * from './errors/error-boundary
|
|
32
|
+
export * from './controls/button'
|
|
33
|
+
export * from './controls/button-group'
|
|
34
|
+
export * from './controls/info-tooltip'
|
|
35
|
+
export * from './controls/tooltip'
|
|
36
|
+
export * from './controls/update-highlighter'
|
|
37
|
+
export * from './controls/tabs'
|
|
38
|
+
export * from './controls/dropdown'
|
|
39
|
+
export * from './controls/code-block'
|
|
40
|
+
export * from './controls/slider'
|
|
41
|
+
export * from './controls/external-link'
|
|
42
|
+
export * from './toast/toast-notifications-block'
|
|
43
|
+
export * from './errors/error-boundary'
|
|
44
44
|
//interaction
|
|
45
|
-
export * from './interaction/autofocus
|
|
46
|
-
export * from './interaction/block-select
|
|
47
|
-
export * from './interaction/copy-to-clipboard
|
|
48
|
-
export * from './interaction/spoiler
|
|
49
|
-
export * from './interaction/accordion
|
|
50
|
-
export * from './interaction/theme-selector
|
|
51
|
-
export * from './interaction/inline-progress
|
|
52
|
-
export * from './interaction/responsive
|
|
53
|
-
export * from './interaction/qr-code
|
|
54
|
-
export * from './interaction/dialog
|
|
55
|
-
export * from './interaction/system-dialog
|
|
45
|
+
export * from './interaction/autofocus'
|
|
46
|
+
export * from './interaction/block-select'
|
|
47
|
+
export * from './interaction/copy-to-clipboard'
|
|
48
|
+
export * from './interaction/spoiler'
|
|
49
|
+
export * from './interaction/accordion'
|
|
50
|
+
export * from './interaction/theme-selector'
|
|
51
|
+
export * from './interaction/inline-progress'
|
|
52
|
+
export * from './interaction/responsive'
|
|
53
|
+
export * from './interaction/qr-code'
|
|
54
|
+
export * from './interaction/dialog'
|
|
55
|
+
export * from './interaction/system-dialog'
|
|
56
56
|
//date components
|
|
57
|
-
export * from './date/utc-timestamp
|
|
58
|
-
export * from './date/elapsed-time
|
|
59
|
-
export * from './date/date-selector
|
|
57
|
+
export * from './date/utc-timestamp'
|
|
58
|
+
export * from './date/elapsed-time'
|
|
59
|
+
export * from './date/date-selector'
|
|
60
60
|
//ledger-entries-related components
|
|
61
|
-
export * from './ledger/ledger-entry-link
|
|
62
|
-
export * from './ledger/ledger-entry-href-formatter
|
|
63
|
-
export * from './ledger/ledger-info-parser
|
|
61
|
+
export * from './ledger/ledger-entry-link'
|
|
62
|
+
export * from './ledger/ledger-entry-href-formatter'
|
|
63
|
+
export * from './ledger/ledger-info-parser'
|
|
64
64
|
//account-related components
|
|
65
|
-
export * from './account/identicon
|
|
66
|
-
export * from './account/account-address
|
|
67
|
-
export * from './account/signer-key
|
|
68
|
-
export * from './account/available-balance
|
|
65
|
+
export * from './account/identicon'
|
|
66
|
+
export * from './account/account-address'
|
|
67
|
+
export * from './account/signer-key'
|
|
68
|
+
export * from './account/available-balance'
|
|
69
69
|
//asset-related components
|
|
70
|
-
export * from './asset/asset-link
|
|
71
|
-
export * from './asset/asset-issuer
|
|
72
|
-
export * from './asset/asset-icon
|
|
73
|
-
export * from './asset/asset-selector
|
|
74
|
-
export * from './asset/amount
|
|
75
|
-
export * from './asset/asset-meta-hooks
|
|
76
|
-
export * from './asset/asset-list-hooks
|
|
70
|
+
export * from './asset/asset-link'
|
|
71
|
+
export * from './asset/asset-issuer'
|
|
72
|
+
export * from './asset/asset-icon'
|
|
73
|
+
export * from './asset/asset-selector'
|
|
74
|
+
export * from './asset/amount'
|
|
75
|
+
export * from './asset/asset-meta-hooks'
|
|
76
|
+
export * from './asset/asset-list-hooks'
|
|
77
77
|
//claimable-balance-related components
|
|
78
|
-
export * from './claimable-balance/claimable-balance-claimants
|
|
78
|
+
export * from './claimable-balance/claimable-balance-claimants'
|
|
79
79
|
//DEX-related components
|
|
80
|
-
export * from './dex/price-dynamic
|
|
80
|
+
export * from './dex/price-dynamic'
|
|
81
81
|
//directory-related components
|
|
82
|
-
export * from './directory/directory-hooks
|
|
82
|
+
export * from './directory/directory-hooks'
|
|
83
83
|
//transaction/operation/effects components
|
|
84
|
-
export * from './tx/tx-operations-list
|
|
85
|
-
export * from './tx/parser/tx-details-parser
|
|
86
|
-
export * from './tx/tx-list-hooks
|
|
87
|
-
export * from './effect/effect-description
|
|
84
|
+
export * from './tx/tx-operations-list'
|
|
85
|
+
export * from './tx/parser/tx-details-parser'
|
|
86
|
+
export * from './tx/tx-list-hooks'
|
|
87
|
+
export * from './effect/effect-description'
|
|
88
88
|
//contract-related components
|
|
89
|
-
export * from './contract/contract-api
|
|
89
|
+
export * from './contract/contract-api'
|
|
90
90
|
//filter component
|
|
91
|
-
export * from './filter/filter-view
|
|
91
|
+
export * from './filter/filter-view'
|
|
92
92
|
//Stellar-specific utils
|
|
93
|
-
export * from './stellar/key-type
|
|
94
|
-
export * from './stellar/signature-hint-utils
|
|
95
|
-
export * from './contract/sc-val
|
|
93
|
+
export * from './stellar/key-type'
|
|
94
|
+
export * from './stellar/signature-hint-utils'
|
|
95
|
+
export * from './contract/sc-val'
|
|
96
96
|
//charts
|
|
97
|
-
export {default as Chart, ChartEngine, ChartLoader} from './charts
|
|
97
|
+
export {default as Chart, ChartEngine, ChartLoader} from './charts'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {useEffect, useState} from 'react'
|
|
2
|
-
import {Button} from '../controls/button
|
|
3
|
-
import {Dialog} from './dialog
|
|
2
|
+
import {Button} from '../controls/button'
|
|
3
|
+
import {Dialog} from './dialog'
|
|
4
4
|
|
|
5
5
|
const defaultConfirmCaption = 'Confirm'
|
|
6
6
|
const defaultCancelCaption = 'Cancel'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import {formatExplorerLink} from './ledger-entry-href-formatter
|
|
4
|
-
import {useStellarNetwork} from '../state/stellar-network-hooks
|
|
3
|
+
import {formatExplorerLink} from './ledger-entry-href-formatter'
|
|
4
|
+
import {useStellarNetwork} from '../state/stellar-network-hooks'
|
|
5
5
|
|
|
6
6
|
function LedgerEntryLink({type, id, network, children}) {
|
|
7
7
|
const globallySetNetwork = useStellarNetwork()
|
package/module/dynamic-module.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stellar-expert/ui-framework",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.2",
|
|
4
4
|
"description": "StellarExpert shared UI components library",
|
|
5
5
|
"author": "orbitlens <orbit@stellar.expert>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
7
|
"main": "index.js",
|
|
9
8
|
"module": "./index.js",
|
|
10
9
|
"types": "index.d.ts",
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
"@stellar-expert/asset-descriptor": "^2.0.0",
|
|
22
21
|
"@stellar-expert/claimable-balance-utils": "^2.0.0",
|
|
23
22
|
"@stellar-expert/client-cache": "^1.1.0",
|
|
24
|
-
"@stellar-expert/contract-wasm-interface-parser": "^5.0.
|
|
23
|
+
"@stellar-expert/contract-wasm-interface-parser": "^5.0.1",
|
|
25
24
|
"@stellar-expert/formatter": "^3.1.0",
|
|
26
25
|
"@stellar-expert/navigation": "^1.1.0",
|
|
27
26
|
"@stellar-expert/tx-meta-effects-parser": "^9.3.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {useState, useEffect} from 'react'
|
|
2
|
-
import {isDocumentVisible, addVisibilityChangeListener, isDocumentVisibilitySupported} from './page-visibility-helpers
|
|
2
|
+
import {isDocumentVisible, addVisibilityChangeListener, isDocumentVisibilitySupported} from './page-visibility-helpers'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Hook that tracks whether the current browser tab/page is visible
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useCallback, useEffect, useState} from 'react'
|
|
2
2
|
import {render} from 'react-dom'
|
|
3
|
-
import ToastNotificationInstance from './toast-notification-instance
|
|
4
|
-
import Notification from './toast-notification
|
|
3
|
+
import ToastNotificationInstance from './toast-notification-instance'
|
|
4
|
+
import Notification from './toast-notification'
|
|
5
5
|
import './toast-notifications.scss'
|
|
6
6
|
|
|
7
7
|
let notificationsCounter = 0
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {Amount} from '../asset/amount
|
|
3
|
-
import {retrieveOpBalanceChanges} from './parser/op-balance-changes
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Compact accounting effects (credited/debited amounts)
|
|
7
|
-
* @param {OperationDescriptor} op
|
|
8
|
-
* @constructor
|
|
9
|
-
*/
|
|
10
|
-
export function OpAccountingChanges({op}) {
|
|
11
|
-
const changes = retrieveOpBalanceChanges(op)
|
|
12
|
-
return <div className="accounting-effects condensed">
|
|
13
|
-
{changes.map((ch, i) => <div key={op.txHash + op.order + i}
|
|
14
|
-
className={ch.type === 'accountDebited' ? 'dimmed' : 'color-success'}>
|
|
15
|
-
{ch.type === 'accountDebited' ? '-' : '+'}
|
|
16
|
-
<Amount amount={ch.amount} asset={ch.asset} issuer={false} icon={false} adjust/>
|
|
17
|
-
</div>)}
|
|
18
|
-
</div>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function TxFeeAccountingChanges({amount}) {
|
|
22
|
-
return <div className="accounting-effects condensed">
|
|
23
|
-
<div className="dimmed">
|
|
24
|
-
-<Amount amount={amount} asset="XLM" issuer={false} icon={false} adjust/>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {Amount} from '../asset/amount'
|
|
3
|
+
import {retrieveOpBalanceChanges} from './parser/op-balance-changes'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Compact accounting effects (credited/debited amounts)
|
|
7
|
+
* @param {OperationDescriptor} op
|
|
8
|
+
* @constructor
|
|
9
|
+
*/
|
|
10
|
+
export function OpAccountingChanges({op}) {
|
|
11
|
+
const changes = retrieveOpBalanceChanges(op)
|
|
12
|
+
return <div className="accounting-effects condensed">
|
|
13
|
+
{changes.map((ch, i) => <div key={op.txHash + op.order + i}
|
|
14
|
+
className={ch.type === 'accountDebited' ? 'dimmed' : 'color-success'}>
|
|
15
|
+
{ch.type === 'accountDebited' ? '-' : '+'}
|
|
16
|
+
<Amount amount={ch.amount} asset={ch.asset} issuer={false} icon={false} adjust/>
|
|
17
|
+
</div>)}
|
|
18
|
+
</div>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function TxFeeAccountingChanges({amount}) {
|
|
22
|
+
return <div className="accounting-effects condensed">
|
|
23
|
+
<div className="dimmed">
|
|
24
|
+
-<Amount amount={amount} asset="XLM" issuer={false} icon={false} adjust/>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
27
|
}
|
|
@@ -3,19 +3,19 @@ import {Networks, AuthRequiredFlag, AuthRevocableFlag, AuthClawbackEnabledFlag,
|
|
|
3
3
|
import {AssetDescriptor} from '@stellar-expert/asset-descriptor'
|
|
4
4
|
import {formatPrice, formatWithAutoPrecision, fromStroops, toStroops, shortenString} from '@stellar-expert/formatter'
|
|
5
5
|
import {xdrParserUtils, contractPreimageEncoder} from '@stellar-expert/tx-meta-effects-parser'
|
|
6
|
-
import {AccountAddress} from '../account/account-address
|
|
7
|
-
import {AccountIdenticon} from '../account/identicon
|
|
8
|
-
import {SignerKey} from '../account/signer-key
|
|
9
|
-
import {Amount} from '../asset/amount
|
|
10
|
-
import {AssetLink} from '../asset/asset-link
|
|
11
|
-
import {useAssetMeta} from '../asset/asset-meta-hooks
|
|
12
|
-
import {OfferLink} from '../ledger/ledger-entry-link
|
|
13
|
-
import {formatExplorerLink} from '../ledger/ledger-entry-href-formatter
|
|
14
|
-
import {ClaimableBalanceClaimants} from '../claimable-balance/claimable-balance-claimants
|
|
15
|
-
import {CopyToClipboard} from '../interaction/copy-to-clipboard
|
|
16
|
-
import {useStellarNetwork} from '../state/stellar-network-hooks
|
|
17
|
-
import InvocationInfoView from '../contract/invocation-info-view
|
|
18
|
-
import {ClaimableBalanceId} from '../claimable-balance/claimable-balance-id
|
|
6
|
+
import {AccountAddress} from '../account/account-address'
|
|
7
|
+
import {AccountIdenticon} from '../account/identicon'
|
|
8
|
+
import {SignerKey} from '../account/signer-key'
|
|
9
|
+
import {Amount} from '../asset/amount'
|
|
10
|
+
import {AssetLink} from '../asset/asset-link'
|
|
11
|
+
import {useAssetMeta} from '../asset/asset-meta-hooks'
|
|
12
|
+
import {OfferLink} from '../ledger/ledger-entry-link'
|
|
13
|
+
import {formatExplorerLink} from '../ledger/ledger-entry-href-formatter'
|
|
14
|
+
import {ClaimableBalanceClaimants} from '../claimable-balance/claimable-balance-claimants'
|
|
15
|
+
import {CopyToClipboard} from '../interaction/copy-to-clipboard'
|
|
16
|
+
import {useStellarNetwork} from '../state/stellar-network-hooks'
|
|
17
|
+
import InvocationInfoView from '../contract/invocation-info-view'
|
|
18
|
+
import {ClaimableBalanceId} from '../claimable-balance/claimable-balance-id'
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Detailed operation description within a transaction
|