@stellar-expert/ui-framework 1.10.5 → 1.11.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.
@@ -3,8 +3,8 @@
3
3
  $tooltip-notch-shadow-color: var(--color-border-shadow);
4
4
 
5
5
  .tooltip-wrapper {
6
- width: 30rem;
7
- max-width: 30rem;
6
+ width: 40rem;
7
+ max-width: Min(40rem, 80vw);
8
8
  position: absolute;
9
9
  visibility: hidden;
10
10
  opacity: 0;
@@ -17,7 +17,7 @@ $tooltip-notch-shadow-color: var(--color-border-shadow);
17
17
  font-size: 0.9*$font-size-base;
18
18
  font-style: normal;
19
19
  line-height: 1.3;
20
- max-width: 30rem;
20
+ max-width: Min(40rem, 80vw);
21
21
  background: var(--color-bg);
22
22
  border-color: var(--color-contrast-border);
23
23
  border-radius: $border-radius-input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-expert/ui-framework",
3
- "version": "1.10.5",
3
+ "version": "1.11.1",
4
4
  "description": "StellarExpert shared UI components library",
5
5
  "main": "index.js",
6
6
  "module": "./index.js",
@@ -848,15 +848,15 @@ function InvokeHostFunctionView({op, compact}) {
848
848
  * @param {Boolean} compact
849
849
  * @constructor
850
850
  */
851
- function BumpFootprintExpirationView({op}) {
852
- const {ledgersToExpire} = op.operation
851
+ function ExtendFootprintTTLView({op}) {
852
+ const {extendTo} = op.operation
853
853
  if (op.isEphemeral)
854
854
  return <>
855
- <b>Bump state expiration</b> for {ledgersToExpire} ledgers
855
+ <b>Extend ledger state expiration</b> to sequence {extendTo}
856
856
  <OpSourceAccount op={op}/>
857
857
  </>
858
858
  return <>
859
- <OpSourceAccount op={op}/> bumped state expiration for {ledgersToExpire} ledgers
859
+ <OpSourceAccount op={op}/> extended ledger state expiration to sequence {extendTo}
860
860
  </>
861
861
  }
862
862
 
@@ -870,10 +870,10 @@ function RestoreFootprintView({op}) {
870
870
  const {ledgersToExpire} = op.operation
871
871
  if (op.isEphemeral)
872
872
  return <>
873
- <b>Restore state</b><OpSourceAccount op={op}/>
873
+ <b>Restore ledger state entry</b> <OpSourceAccount op={op}/>
874
874
  </>
875
875
  return <>
876
- <OpSourceAccount op={op}/> restored state
876
+ <OpSourceAccount op={op}/> restored ledger state entry
877
877
  </>
878
878
  }
879
879
 
@@ -909,7 +909,7 @@ const typeMapping = {
909
909
  liquidityPoolDeposit: DepositLiquidityDescriptionView,
910
910
  liquidityPoolWithdraw: WithdrawLiquidityDescriptionView,
911
911
  invokeHostFunction: InvokeHostFunctionView,
912
- bumpFootprintExpiration: BumpFootprintExpirationView,
912
+ extendFootprintTTL: ExtendFootprintTTLView,
913
913
  restoreFootprint: RestoreFootprintView
914
914
  }
915
915
 
@@ -70,13 +70,25 @@ export const TxOperationsList = React.memo(function TxOperationsList({
70
70
  showEffects
71
71
  }) {
72
72
  const [effectsExpanded, setEffectsExpanded] = useState(false)
73
+ const [opsExpanded, setOpsExpanded] = useState(false)
73
74
  const toggleEffects = useCallback(e => setEffectsExpanded(e.expanded), [])
75
+ const toggleAdditionalOps = useCallback(e => setOpsExpanded(e.expanded), [])
74
76
  let {operations} = parsedTx
75
77
  let opdiff = 0
76
- //filter operations if filtered output is requested
77
- if (filter) {
78
- operations = operations.filter(filter)
79
- opdiff = parsedTx.operations.length - operations.length
78
+ if (!opsExpanded) {
79
+ //filter operations if filtered output is requested
80
+ if (filter) {
81
+ const visibleOps = operations.filter(filter)
82
+ if (visibleOps.length) {
83
+ operations = visibleOps
84
+ opdiff = parsedTx.operations.length - operations.length
85
+ }
86
+ }
87
+ //hide some operations in large transactions to prevent interface hanging
88
+ if (operations.length > 5) {
89
+ operations = operations.subarray(0, 5)
90
+ opdiff = parsedTx.operations.length - operations.length
91
+ }
80
92
  }
81
93
 
82
94
  return <div>
@@ -97,9 +109,8 @@ export const TxOperationsList = React.memo(function TxOperationsList({
97
109
  {effectsExpanded && <OpEffectsView effects={op.operation.effects}/>}
98
110
  </div>)}
99
111
  {showFees && <TxChargedFee {...{parsedTx, compact}}/>}
100
- {opdiff > 0 && <div className="dimmed text-small block-indent">
101
- {opdiff} more operation{opdiff > 1 && 's'} hidden
102
- </div>}
112
+ {(opsExpanded || opdiff > 0) && <Spoiler expanded={opsExpanded} onChange={toggleAdditionalOps}
113
+ showMore={`${opdiff} more operation${opdiff > 1 && 's'} hidden`} showLess="Hide extra operations"/>}
103
114
  </div>
104
115
  </div>
105
116
  })