@oanda/labs-instrument-live-rate-widget 1.0.14 → 1.0.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.
- package/CHANGELOG.md +132 -0
- package/dist/main/InstrumentLiveRateWidget/utils.js +2 -2
- package/dist/main/InstrumentLiveRateWidget/utils.js.map +1 -1
- package/dist/module/InstrumentLiveRateWidget/utils.js +2 -2
- package/dist/module/InstrumentLiveRateWidget/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/InstrumentLiveRateWidget/utils.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,138 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.0.16 (2024-08-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.0.154 (2024-08-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.0.153 (2024-08-23)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 1.0.152 (2024-08-23)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.0.151 (2024-08-20)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 1.0.150 (2024-08-19)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 1.0.149 (2024-08-07)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## 1.0.148 (2024-08-01)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## 1.0.147 (2024-08-01)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 1.0.146 (2024-07-26)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 1.0.145 (2024-07-25)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 1.0.144 (2024-07-22)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## 1.0.143 (2024-07-19)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## 1.0.142 (2024-07-16)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## 1.0.141 (2024-07-16)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 1.0.140 (2024-07-12)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @oanda/labs-instrument-live-rate-widget
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## 1.0.15 (2024-08-29)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## 1.0.153 (2024-08-23)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## 1.0.152 (2024-08-23)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## 1.0.151 (2024-08-20)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## 1.0.150 (2024-08-19)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 1.0.149 (2024-08-07)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## 1.0.148 (2024-08-01)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## 1.0.147 (2024-08-01)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 1.0.146 (2024-07-26)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## 1.0.145 (2024-07-25)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## 1.0.144 (2024-07-22)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## 1.0.143 (2024-07-19)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## 1.0.142 (2024-07-16)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 1.0.141 (2024-07-16)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## 1.0.140 (2024-07-12)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @oanda/labs-instrument-live-rate-widget
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
6
138
|
## 1.0.14 (2024-08-23)
|
|
7
139
|
|
|
8
140
|
|
|
@@ -26,8 +26,8 @@ const useRecords = (record, target) => {
|
|
|
26
26
|
setUpdatedRecord({
|
|
27
27
|
displayName: record.displayName,
|
|
28
28
|
instrument: record.instrument,
|
|
29
|
-
buy: update?.
|
|
30
|
-
buyPriceMovement: update?.
|
|
29
|
+
buy: update?.ask,
|
|
30
|
+
buyPriceMovement: update?.askPriceMovement,
|
|
31
31
|
dailyPercentChange: update?.dailyPercentChangeFromOpen,
|
|
32
32
|
dailyPipsChange: update?.dailyPipsChangeFromOpen,
|
|
33
33
|
displayPrecision: update?.displayPrecision
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_react","require","_labsWidgetCommon","getRecords","data","mapInstrumentNames","map","item","instrument","name","displayName","exports","useRecords","record","target","updatedRecord","setUpdatedRecord","useState","sentiment","error","setError","update","liveRatesError","useLiveRatesMessage","useEffect","buy","
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_react","require","_labsWidgetCommon","getRecords","data","mapInstrumentNames","map","item","instrument","name","displayName","exports","useRecords","record","target","updatedRecord","setUpdatedRecord","useState","sentiment","error","setError","update","liveRatesError","useLiveRatesMessage","useEffect","buy","ask","buyPriceMovement","askPriceMovement","dailyPercentChange","dailyPercentChangeFromOpen","dailyPipsChange","dailyPipsChangeFromOpen","displayPrecision"],"sources":["../../../src/InstrumentLiveRateWidget/utils.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { DataRecord, LiveRatesErrorMessage, useLiveRatesMessage } from '@oanda/labs-widget-common';\nimport { ValidateInstrumentsQuery } from '../gql/types/graphql';\n\nconst getRecords = (data: ValidateInstrumentsQuery) => data?.mapInstrumentNames?.map((item) => ({\n instrument: item?.name || '',\n displayName: item?.displayName || '',\n}));\n\nconst useRecords = (\n record: DataRecord,\n target: EventTarget | null,\n) => {\n const [updatedRecord, setUpdatedRecord] = useState<DataRecord>({\n displayName: record.displayName,\n instrument: record.instrument,\n sentiment: record.sentiment,\n });\n const [error, setError] = useState<LiveRatesErrorMessage | null>(null);\n\n const { update, error: liveRatesError } = useLiveRatesMessage(\n record.instrument,\n target,\n );\n\n useEffect(() => {\n setUpdatedRecord({\n displayName: record.displayName,\n instrument: record.instrument,\n buy: update?.ask,\n buyPriceMovement: update?.askPriceMovement,\n dailyPercentChange: update?.dailyPercentChangeFromOpen,\n dailyPipsChange: update?.dailyPipsChangeFromOpen,\n displayPrecision: update?.displayPrecision,\n });\n setError(liveRatesError);\n }, [update, record, liveRatesError]);\n\n return {\n updatedRecord,\n error,\n };\n};\n\nexport {\n getRecords,\n useRecords,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAGA,MAAME,UAAU,GAAIC,IAA8B,IAAKA,IAAI,EAAEC,kBAAkB,EAAEC,GAAG,CAAEC,IAAI,KAAM;EAC9FC,UAAU,EAAED,IAAI,EAAEE,IAAI,IAAI,EAAE;EAC5BC,WAAW,EAAEH,IAAI,EAAEG,WAAW,IAAI;AACpC,CAAC,CAAC,CAAC;AAACC,OAAA,CAAAR,UAAA,GAAAA,UAAA;AAEJ,MAAMS,UAAU,GAAGA,CACjBC,MAAkB,EAClBC,MAA0B,KACvB;EACH,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAC,eAAQ,EAAa;IAC7DP,WAAW,EAAEG,MAAM,CAACH,WAAW;IAC/BF,UAAU,EAAEK,MAAM,CAACL,UAAU;IAC7BU,SAAS,EAAEL,MAAM,CAACK;EACpB,CAAC,CAAC;EACF,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAH,eAAQ,EAA+B,IAAI,CAAC;EAEtE,MAAM;IAAEI,MAAM;IAAEF,KAAK,EAAEG;EAAe,CAAC,GAAG,IAAAC,qCAAmB,EAC3DV,MAAM,CAACL,UAAU,EACjBM,MACF,CAAC;EAED,IAAAU,gBAAS,EAAC,MAAM;IACdR,gBAAgB,CAAC;MACfN,WAAW,EAAEG,MAAM,CAACH,WAAW;MAC/BF,UAAU,EAAEK,MAAM,CAACL,UAAU;MAC7BiB,GAAG,EAAEJ,MAAM,EAAEK,GAAG;MAChBC,gBAAgB,EAAEN,MAAM,EAAEO,gBAAgB;MAC1CC,kBAAkB,EAAER,MAAM,EAAES,0BAA0B;MACtDC,eAAe,EAAEV,MAAM,EAAEW,uBAAuB;MAChDC,gBAAgB,EAAEZ,MAAM,EAAEY;IAC5B,CAAC,CAAC;IACFb,QAAQ,CAACE,cAAc,CAAC;EAC1B,CAAC,EAAE,CAACD,MAAM,EAAER,MAAM,EAAES,cAAc,CAAC,CAAC;EAEpC,OAAO;IACLP,aAAa;IACbI;EACF,CAAC;AACH,CAAC;AAACR,OAAA,CAAAC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -19,8 +19,8 @@ const useRecords = (record, target) => {
|
|
|
19
19
|
setUpdatedRecord({
|
|
20
20
|
displayName: record.displayName,
|
|
21
21
|
instrument: record.instrument,
|
|
22
|
-
buy: update?.
|
|
23
|
-
buyPriceMovement: update?.
|
|
22
|
+
buy: update?.ask,
|
|
23
|
+
buyPriceMovement: update?.askPriceMovement,
|
|
24
24
|
dailyPercentChange: update?.dailyPercentChangeFromOpen,
|
|
25
25
|
dailyPipsChange: update?.dailyPipsChangeFromOpen,
|
|
26
26
|
displayPrecision: update?.displayPrecision
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["useState","useEffect","useLiveRatesMessage","getRecords","data","mapInstrumentNames","map","item","instrument","name","displayName","useRecords","record","target","updatedRecord","setUpdatedRecord","sentiment","error","setError","update","liveRatesError","buy","
|
|
1
|
+
{"version":3,"file":"utils.js","names":["useState","useEffect","useLiveRatesMessage","getRecords","data","mapInstrumentNames","map","item","instrument","name","displayName","useRecords","record","target","updatedRecord","setUpdatedRecord","sentiment","error","setError","update","liveRatesError","buy","ask","buyPriceMovement","askPriceMovement","dailyPercentChange","dailyPercentChangeFromOpen","dailyPipsChange","dailyPipsChangeFromOpen","displayPrecision"],"sources":["../../../src/InstrumentLiveRateWidget/utils.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { DataRecord, LiveRatesErrorMessage, useLiveRatesMessage } from '@oanda/labs-widget-common';\nimport { ValidateInstrumentsQuery } from '../gql/types/graphql';\n\nconst getRecords = (data: ValidateInstrumentsQuery) => data?.mapInstrumentNames?.map((item) => ({\n instrument: item?.name || '',\n displayName: item?.displayName || '',\n}));\n\nconst useRecords = (\n record: DataRecord,\n target: EventTarget | null,\n) => {\n const [updatedRecord, setUpdatedRecord] = useState<DataRecord>({\n displayName: record.displayName,\n instrument: record.instrument,\n sentiment: record.sentiment,\n });\n const [error, setError] = useState<LiveRatesErrorMessage | null>(null);\n\n const { update, error: liveRatesError } = useLiveRatesMessage(\n record.instrument,\n target,\n );\n\n useEffect(() => {\n setUpdatedRecord({\n displayName: record.displayName,\n instrument: record.instrument,\n buy: update?.ask,\n buyPriceMovement: update?.askPriceMovement,\n dailyPercentChange: update?.dailyPercentChangeFromOpen,\n dailyPipsChange: update?.dailyPipsChangeFromOpen,\n displayPrecision: update?.displayPrecision,\n });\n setError(liveRatesError);\n }, [update, record, liveRatesError]);\n\n return {\n updatedRecord,\n error,\n };\n};\n\nexport {\n getRecords,\n useRecords,\n};\n"],"mappings":"AAAA,SAASA,QAAQ,EAA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ACF,CAAC;AACH,CAAC;AAED,SACEd,UAAU,EACVQ,UAAU","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oanda/labs-instrument-live-rate-widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "Labs Instrument Live Rate Widget",
|
|
5
5
|
"main": "dist/main/index.js",
|
|
6
6
|
"module": "dist/module/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"author": "OANDA",
|
|
13
13
|
"license": "UNLICENSED",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@oanda/labs-widget-common": "^1.0.
|
|
15
|
+
"@oanda/labs-widget-common": "^1.0.155",
|
|
16
16
|
"@oanda/mono-i18n": "10.0.1",
|
|
17
17
|
"graphql": "16.8.1"
|
|
18
18
|
},
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"@graphql-codegen/cli": "5.0.0",
|
|
21
21
|
"@graphql-codegen/client-preset": "4.1.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "eecb0d8d995023c4374b106577b8be81b27604d4"
|
|
24
24
|
}
|
|
@@ -27,8 +27,8 @@ const useRecords = (
|
|
|
27
27
|
setUpdatedRecord({
|
|
28
28
|
displayName: record.displayName,
|
|
29
29
|
instrument: record.instrument,
|
|
30
|
-
buy: update?.
|
|
31
|
-
buyPriceMovement: update?.
|
|
30
|
+
buy: update?.ask,
|
|
31
|
+
buyPriceMovement: update?.askPriceMovement,
|
|
32
32
|
dailyPercentChange: update?.dailyPercentChangeFromOpen,
|
|
33
33
|
dailyPipsChange: update?.dailyPipsChangeFromOpen,
|
|
34
34
|
displayPrecision: update?.displayPrecision,
|