@subiz/widget-v4 4.1.27 → 4.1.29
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/compiled_src/chatbox/GenericTemplateAttachments.js +5 -1
- package/compiled_src/chatbox/ProductAttachments.js +7 -2
- package/compiled_src/chatbox/Widget.js +12 -0
- package/compiled_src/chatbox/main.js +24 -2
- package/compiled_src/util/campaign.js +23 -10
- package/compiled_src/util/common.js +667 -4
- package/compiled_src/util/order.js +4 -2
- package/compiled_src/util/pubsub.js +6 -3
- package/index.html +8 -0
- package/package.json +10 -10
- package/src/chatbox/GenericTemplateAttachments.js +5 -5
- package/src/chatbox/ProductAttachments.js +7 -6
- package/src/chatbox/Widget.js +14 -0
- package/src/chatbox/main.js +24 -1
- package/src/util/campaign.js +29 -8
- package/src/util/common.js +198 -3
package/index.html
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<h1>Subiz widget testing</h1>
|
|
16
|
+
<button id="test1">Test 1</button>
|
|
16
17
|
<script>
|
|
17
18
|
function getUrlParameter(name) {
|
|
18
19
|
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]')
|
|
@@ -38,6 +39,13 @@
|
|
|
38
39
|
if (accid == 'acpxkgumifuoofoosble') {
|
|
39
40
|
window.subiz('setViewingProduct', {id: '220170', sku: 'ipx', source_id: 'IPHONE10'})
|
|
40
41
|
}
|
|
42
|
+
|
|
43
|
+
setTimeout(function () {
|
|
44
|
+
const button = document.createElement('button')
|
|
45
|
+
button.innerText = 'test2'
|
|
46
|
+
button.id = 'test2'
|
|
47
|
+
document.body.appendChild(button)
|
|
48
|
+
}, 2000)
|
|
41
49
|
</script>
|
|
42
50
|
</body>
|
|
43
51
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subiz/widget-v4",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.29",
|
|
4
4
|
"main": "./compiled_src/lib.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "npx webpack serve --config webpack.dev.js",
|
|
@@ -12,30 +12,30 @@
|
|
|
12
12
|
"@subiz/ajax": "^3.0.12",
|
|
13
13
|
"@subiz/flow": "^1.0.9",
|
|
14
14
|
"@subiz/storage": "0.0.8",
|
|
15
|
-
"@subiz/wsclient": "^4.0.
|
|
15
|
+
"@subiz/wsclient": "^4.0.14",
|
|
16
16
|
"cookie_js": "1.4.2",
|
|
17
|
-
"core-js": "^3.
|
|
17
|
+
"core-js": "^3.30.0",
|
|
18
18
|
"css-loader": "5.2.7",
|
|
19
19
|
"file-loader": "^6.2.0",
|
|
20
20
|
"less": "^4.1.3",
|
|
21
21
|
"less-loader": "^11.1.0",
|
|
22
|
-
"marked": "^4.
|
|
23
|
-
"preact": "^10.13.
|
|
22
|
+
"marked": "^4.3.0",
|
|
23
|
+
"preact": "^10.13.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@babel/cli": "^7.21.0",
|
|
27
|
-
"@babel/core": "^7.21.
|
|
27
|
+
"@babel/core": "^7.21.4",
|
|
28
28
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
29
29
|
"@babel/plugin-transform-react-jsx": "^7.21.0",
|
|
30
|
-
"@babel/preset-env": "^7.
|
|
30
|
+
"@babel/preset-env": "^7.21.4",
|
|
31
31
|
"babel-loader": "^9.1.2",
|
|
32
32
|
"babel-plugin-syntax-jsx": "^6.18.0",
|
|
33
33
|
"html-webpack-plugin": "^5.5.0",
|
|
34
|
-
"prettier": "^2.8.
|
|
34
|
+
"prettier": "^2.8.7",
|
|
35
35
|
"puppeteer": "^19.7.3",
|
|
36
|
-
"webpack": "^5.
|
|
36
|
+
"webpack": "^5.78.0",
|
|
37
37
|
"webpack-bundle-analyzer": "^4.8.0",
|
|
38
38
|
"webpack-cli": "^5.0.1",
|
|
39
|
-
"webpack-dev-server": "^4.
|
|
39
|
+
"webpack-dev-server": "^4.13.2"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -42,14 +42,14 @@ export default class GenericTemplateAttachments extends Com {
|
|
|
42
42
|
let $title = title ? <div class='generic-attachment--element-title'>{title}</div> : null
|
|
43
43
|
let $subtitle = subtitle ? <div class='generic-attachment--element-subtitle'>{subtitle}</div> : null
|
|
44
44
|
|
|
45
|
+
let imgsrc = this.props.store.replaceFileUrl(ele.image_url)
|
|
46
|
+
if (!ele.image_url) {
|
|
47
|
+
imgsrc = require('../../assets/img/default.jpg')
|
|
48
|
+
}
|
|
45
49
|
return (
|
|
46
50
|
<div class='generic-attachment--element swiper-slide'>
|
|
47
51
|
<div>
|
|
48
|
-
<img
|
|
49
|
-
alt='generic attachment element'
|
|
50
|
-
class='generic-attachment--element-img'
|
|
51
|
-
src={this.props.store.replaceFileUrl(ele.image_url)}
|
|
52
|
-
/>
|
|
52
|
+
<img alt='generic attachment element' class='generic-attachment--element-img' src={imgsrc} />
|
|
53
53
|
</div>
|
|
54
54
|
<div class='generic-attachment--element-content'>
|
|
55
55
|
{$title}
|
|
@@ -78,19 +78,20 @@ export default class ProductAttachments extends Com {
|
|
|
78
78
|
let desc = product.description || product.long_description
|
|
79
79
|
if (desc) $subtitle = <div class='product_attachment__subtitle'>{desc}</div>
|
|
80
80
|
|
|
81
|
+
let currency = product.currency || sb.get(acc, 'currency', 'VND')
|
|
81
82
|
let $price = null
|
|
82
83
|
if (product.price) {
|
|
83
|
-
$price = (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
)
|
|
84
|
+
$price = <div class='product_attachment__price'>{sb.formatCurrency(product.price, currency)}</div>
|
|
85
|
+
}
|
|
86
|
+
let imgsrc = this.props.store.replaceFileUrl(product.image)
|
|
87
|
+
if (!product.image) {
|
|
88
|
+
imgsrc = require('../../assets/img/default.jpg')
|
|
88
89
|
}
|
|
89
90
|
return (
|
|
90
91
|
<div class={'product_attachment product_attachment__' + byType}>
|
|
91
92
|
<div>
|
|
92
93
|
<a href={this.props.store.replaceFileUrl(product.image)} target='_blank'>
|
|
93
|
-
<img class='product_attachment__img' src={
|
|
94
|
+
<img class='product_attachment__img' src={imgsrc} />
|
|
94
95
|
</a>
|
|
95
96
|
</div>
|
|
96
97
|
{$title}
|
package/src/chatbox/Widget.js
CHANGED
|
@@ -25,6 +25,8 @@ export default class Widget extends Com {
|
|
|
25
25
|
constructor(props) {
|
|
26
26
|
super(props)
|
|
27
27
|
this.userSent = {}
|
|
28
|
+
// check user had input form
|
|
29
|
+
this.wasFormInputed = false
|
|
28
30
|
this.setState({
|
|
29
31
|
creating: false,
|
|
30
32
|
clickedJoin: false,
|
|
@@ -241,6 +243,7 @@ export default class Widget extends Com {
|
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
onBooleanChange(key, e) {
|
|
246
|
+
this.wasFormInputed = true
|
|
244
247
|
let formData = sb.cloneDeep(this.state.formData)
|
|
245
248
|
let field = sb.find(formData, (_, fkkey) => fkkey === key)
|
|
246
249
|
if (!field) return
|
|
@@ -250,6 +253,7 @@ export default class Widget extends Com {
|
|
|
250
253
|
}
|
|
251
254
|
|
|
252
255
|
onInputChange(key, val) {
|
|
256
|
+
this.wasFormInputed = true
|
|
253
257
|
let formData = sb.cloneDeep(this.state.formData)
|
|
254
258
|
let field = sb.find(formData, (_, fkkey) => fkkey === key)
|
|
255
259
|
if (!field) return
|
|
@@ -258,6 +262,7 @@ export default class Widget extends Com {
|
|
|
258
262
|
}
|
|
259
263
|
|
|
260
264
|
onListAddItem(key, val) {
|
|
265
|
+
this.wasFormInputed = true
|
|
261
266
|
let formData = sb.cloneDeep(this.state.formData)
|
|
262
267
|
let field = sb.find(formData, (_, fkkey) => fkkey === key)
|
|
263
268
|
if (!field) return
|
|
@@ -268,6 +273,7 @@ export default class Widget extends Com {
|
|
|
268
273
|
}
|
|
269
274
|
|
|
270
275
|
onListRemoveItem(key, index) {
|
|
276
|
+
this.wasFormInputed = true
|
|
271
277
|
let formData = sb.cloneDeep(this.state.formData)
|
|
272
278
|
let field = sb.find(formData, (_, fkkey) => fkkey === key)
|
|
273
279
|
if (!field) return
|
|
@@ -308,6 +314,7 @@ export default class Widget extends Com {
|
|
|
308
314
|
}
|
|
309
315
|
|
|
310
316
|
toggleCheckboxField(key, v) {
|
|
317
|
+
this.wasFormInputed = true
|
|
311
318
|
let formData = sb.cloneDeep(this.state.formData)
|
|
312
319
|
let field = sb.find(formData, (f, fkkey) => f.key === key)
|
|
313
320
|
if (!field) return
|
|
@@ -355,6 +362,7 @@ export default class Widget extends Com {
|
|
|
355
362
|
}
|
|
356
363
|
|
|
357
364
|
toggleRadioField(key, v) {
|
|
365
|
+
this.wasFormInputed = true
|
|
358
366
|
let formData = sb.cloneDeep(this.state.formData)
|
|
359
367
|
let field = sb.find(formData, (f, fkkey) => f.key === key)
|
|
360
368
|
if (!field) return
|
|
@@ -364,6 +372,7 @@ export default class Widget extends Com {
|
|
|
364
372
|
}
|
|
365
373
|
|
|
366
374
|
selectDropdownField(key, v) {
|
|
375
|
+
this.wasFormInputed = true
|
|
367
376
|
let formData = sb.cloneDeep(this.state.formData)
|
|
368
377
|
let field = sb.find(formData, (f, fkkey) => f.key === key)
|
|
369
378
|
if (!field) return
|
|
@@ -722,12 +731,17 @@ export default class Widget extends Com {
|
|
|
722
731
|
this.props.store.createPostback(this.props.cid, postback)
|
|
723
732
|
}
|
|
724
733
|
|
|
734
|
+
onChangeMessageInput() {
|
|
735
|
+
this.wasFormInputed = true
|
|
736
|
+
}
|
|
737
|
+
|
|
725
738
|
renderChat() {
|
|
726
739
|
let $input = (
|
|
727
740
|
<MessageInput
|
|
728
741
|
store={this.props.store}
|
|
729
742
|
ref={this.msgInput}
|
|
730
743
|
cid={this.props.cid}
|
|
744
|
+
onChange={this.onChangeMessageInput}
|
|
731
745
|
onSend={this.sendMessage}
|
|
732
746
|
t={this.props.t}
|
|
733
747
|
/>
|
package/src/chatbox/main.js
CHANGED
|
@@ -14,6 +14,7 @@ export default class Main extends Com {
|
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props)
|
|
16
16
|
this.refButton = createRef()
|
|
17
|
+
this.refWidget = createRef()
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
async refreshCSS() {
|
|
@@ -49,7 +50,7 @@ export default class Main extends Com {
|
|
|
49
50
|
|
|
50
51
|
this.checkExpand()
|
|
51
52
|
this.props.store.onResetCSS(this, () => this.refreshCSS())
|
|
52
|
-
this.props.store.onConvoEvent(this, (
|
|
53
|
+
this.props.store.onConvoEvent(this, (ev) => this.onConvoEvent(ev))
|
|
53
54
|
this.props.store.onUpdate(this, (_) => this.checkExpand())
|
|
54
55
|
await this.refreshCSS()
|
|
55
56
|
this.setState({cssready: true})
|
|
@@ -89,11 +90,33 @@ export default class Main extends Com {
|
|
|
89
90
|
onClose={(a) => this.onWidgetClose(a)}
|
|
90
91
|
onGo={(a) => this.showWidget(a)}
|
|
91
92
|
t={this.props.t}
|
|
93
|
+
ref={this.refWidget}
|
|
92
94
|
/>
|
|
93
95
|
</div>
|
|
94
96
|
)
|
|
95
97
|
}
|
|
96
98
|
|
|
99
|
+
onConvoEvent(ev) {
|
|
100
|
+
this.checkExpand()
|
|
101
|
+
this.checkShowBotConvo(ev)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
checkShowBotConvo(ev) {
|
|
105
|
+
let $widget = this.refWidget.current
|
|
106
|
+
if (!$widget) return
|
|
107
|
+
if ($widget.wasFormInputed) return
|
|
108
|
+
if (ev.type !== 'message_sent') return
|
|
109
|
+
if (!this.state.isShowWidget) return
|
|
110
|
+
|
|
111
|
+
let byType = sb.get(ev, 'by.type')
|
|
112
|
+
let byid = sb.get(ev, 'by.id') || ''
|
|
113
|
+
if (!byid.startsWith('bb') || byType !== 'agent') return
|
|
114
|
+
|
|
115
|
+
let cid = sb.get(ev, 'data.message.conversation_id')
|
|
116
|
+
if (!cid) return
|
|
117
|
+
this.showWidget({cid, view: 'chat'})
|
|
118
|
+
}
|
|
119
|
+
|
|
97
120
|
checkExpand() {
|
|
98
121
|
// run on desktop environment only
|
|
99
122
|
if (this.props.store.isMobile()) return
|
package/src/util/campaign.js
CHANGED
|
@@ -35,14 +35,15 @@ export function trackAreaClicked(selector, cb) {
|
|
|
35
35
|
common.map(selector.split('\n'), (selector) => {
|
|
36
36
|
selector = common.trim(selector)
|
|
37
37
|
if (!selector) return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
on('click', selector, cb)
|
|
39
|
+
//let doms = []
|
|
40
|
+
//try {
|
|
41
|
+
//doms = document.querySelectorAll(selector)
|
|
42
|
+
//} catch (e) {}
|
|
43
|
+
//common.map(doms, (dom) => {
|
|
44
|
+
//if (!dom) return
|
|
45
|
+
//dom.addEventListener('click', cb, false)
|
|
46
|
+
//})
|
|
46
47
|
})
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -99,3 +100,23 @@ export function trackTimeOnPage(seconds = 0, cb) {
|
|
|
99
100
|
common.clearInterval(timer)
|
|
100
101
|
}, 1000)
|
|
101
102
|
}
|
|
103
|
+
|
|
104
|
+
function on(eventName, selector, fn) {
|
|
105
|
+
document.addEventListener(eventName, function (event) {
|
|
106
|
+
let possibleTargets = document.querySelectorAll(selector)
|
|
107
|
+
let target = event.target
|
|
108
|
+
|
|
109
|
+
for (let i = 0, l = possibleTargets.length; i < l; i++) {
|
|
110
|
+
let el = target
|
|
111
|
+
let p = possibleTargets[i]
|
|
112
|
+
|
|
113
|
+
while (el && el !== document) {
|
|
114
|
+
if (el === p) {
|
|
115
|
+
return fn.call(p, event)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
el = el.parentNode
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
}
|
package/src/util/common.js
CHANGED
|
@@ -1082,10 +1082,22 @@ export function getUrlParameter() {
|
|
|
1082
1082
|
|
|
1083
1083
|
export var sleep = (ms) => new Promise((res) => setTimeout(res, ms))
|
|
1084
1084
|
|
|
1085
|
-
export function formatCurrency(val) {
|
|
1086
|
-
|
|
1085
|
+
export function formatCurrency(val, currency = 'VND') {
|
|
1086
|
+
let currencyObj = ALL_CURRENCIES.find((cur) => cur.code === currency) || {name: 'Dong', code: 'VND', symbol: '₫'}
|
|
1087
|
+
|
|
1088
|
+
let prefix = ''
|
|
1089
|
+
let suffix = ''
|
|
1090
|
+
if (currency === 'VND') {
|
|
1091
|
+
prefix = ''
|
|
1092
|
+
suffix = ' ' + currencyObj.symbol
|
|
1093
|
+
} else {
|
|
1094
|
+
prefix = currencyObj.symbol + ' '
|
|
1095
|
+
suffix = ''
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
if (!val) return `${prefix}0${suffix}`
|
|
1087
1099
|
val = Math.round(val)
|
|
1088
|
-
return val.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,') +
|
|
1100
|
+
return prefix + val.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,') + suffix
|
|
1089
1101
|
}
|
|
1090
1102
|
|
|
1091
1103
|
function replaceFileUrl(src) {
|
|
@@ -1155,6 +1167,189 @@ export function scrollIntoViewIfNeeded($ele) {
|
|
|
1155
1167
|
}
|
|
1156
1168
|
}
|
|
1157
1169
|
|
|
1170
|
+
const ALL_CURRENCIES = [
|
|
1171
|
+
{name: 'Afghani', code: 'AFN', symbol: '؋'},
|
|
1172
|
+
{name: 'Euro', code: 'EUR', symbol: '€'},
|
|
1173
|
+
{name: 'Lek', code: 'ALL', symbol: 'Lek'},
|
|
1174
|
+
{name: 'Algerian Dinar', code: 'DZD'},
|
|
1175
|
+
{name: 'US Dollar', code: 'USD', symbol: '$'},
|
|
1176
|
+
{name: 'Kwanza', code: 'AOA'},
|
|
1177
|
+
{name: 'East Caribbean Dollar', code: 'XCD', symbol: '$'},
|
|
1178
|
+
{name: 'Argentine Peso', code: 'ARS', symbol: '$'},
|
|
1179
|
+
{name: 'Armenian Dram', code: 'AMD'},
|
|
1180
|
+
{name: 'Aruban Florin', code: 'AWG', symbol: 'ƒ'},
|
|
1181
|
+
{name: 'Australian Dollar', code: 'AUD', symbol: '$'},
|
|
1182
|
+
{name: 'Azerbaijan Manat', code: 'AZN', symbol: '₼'},
|
|
1183
|
+
{name: 'Bahamian Dollar', code: 'BSD', symbol: '$'},
|
|
1184
|
+
{name: 'Bahraini Dinar', code: 'BHD'},
|
|
1185
|
+
{name: 'Taka', code: 'BDT'},
|
|
1186
|
+
{name: 'Barbados Dollar', code: 'BBD', symbol: '$'},
|
|
1187
|
+
{name: 'Belarusian Ruble', code: 'BYN', symbol: 'Br'},
|
|
1188
|
+
{name: 'Belize Dollar', code: 'BZD', symbol: 'BZ$'},
|
|
1189
|
+
{name: 'CFA Franc BCEAO', code: 'XOF'},
|
|
1190
|
+
{name: 'Bermudian Dollar', code: 'BMD', symbol: '$'},
|
|
1191
|
+
{name: 'Indian Rupee', code: 'INR', symbol: '₹'},
|
|
1192
|
+
{name: 'Ngultrum', code: 'BTN'},
|
|
1193
|
+
{name: 'Boliviano', code: 'BOB', symbol: '$b'},
|
|
1194
|
+
{name: 'Mvdol', code: 'BOV'},
|
|
1195
|
+
{name: 'Convertible Mark', code: 'BAM', symbol: 'KM'},
|
|
1196
|
+
{name: 'Pula', code: 'BWP', symbol: 'P'},
|
|
1197
|
+
{name: 'Norwegian Krone', code: 'NOK', symbol: 'kr'},
|
|
1198
|
+
{name: 'Brazilian Real', code: 'BRL', symbol: 'R$'},
|
|
1199
|
+
{name: 'Brunei Dollar', code: 'BND', symbol: '$'},
|
|
1200
|
+
{name: 'Bulgarian Lev', code: 'BGN', symbol: 'лв'},
|
|
1201
|
+
{name: 'Burundi Franc', code: 'BIF'},
|
|
1202
|
+
{name: 'Cabo Verde Escudo', code: 'CVE'},
|
|
1203
|
+
{name: 'Riel', code: 'KHR', symbol: '៛'},
|
|
1204
|
+
{name: 'CFA Franc BEAC', code: 'XAF'},
|
|
1205
|
+
{name: 'Canadian Dollar', code: 'CAD', symbol: '$'},
|
|
1206
|
+
{name: 'Cayman Islands Dollar', code: 'KYD', symbol: '$'},
|
|
1207
|
+
{name: 'Chilean Peso', code: 'CLP', symbol: '$'},
|
|
1208
|
+
{name: 'Unidad de Fomento', code: 'CLF'},
|
|
1209
|
+
{name: 'Yuan Renminbi', code: 'CNY', symbol: '¥'},
|
|
1210
|
+
{name: 'Colombian Peso', code: 'COP', symbol: '$'},
|
|
1211
|
+
{name: 'Unidad de Valor Real', code: 'COU'},
|
|
1212
|
+
{name: 'Comorian Franc ', code: 'KMF'},
|
|
1213
|
+
{name: 'Congolese Franc', code: 'CDF'},
|
|
1214
|
+
{name: 'New Zealand Dollar', code: 'NZD', symbol: '$'},
|
|
1215
|
+
{name: 'Costa Rican Colon', code: 'CRC', symbol: '₡'},
|
|
1216
|
+
{name: 'Kuna', code: 'HRK', symbol: 'kn'},
|
|
1217
|
+
{name: 'Cuban Peso', code: 'CUP', symbol: '₱'},
|
|
1218
|
+
{name: 'Peso Convertible', code: 'CUC'},
|
|
1219
|
+
{name: 'Netherlands Antillean Guilder', code: 'ANG', symbol: 'ƒ'},
|
|
1220
|
+
{name: 'Czech Koruna', code: 'CZK', symbol: 'Kč'},
|
|
1221
|
+
{name: 'Danish Krone', code: 'DKK', symbol: 'kr'},
|
|
1222
|
+
{name: 'Djibouti Franc', code: 'DJF'},
|
|
1223
|
+
{name: 'Dominican Peso', code: 'DOP', symbol: 'RD$'},
|
|
1224
|
+
{name: 'Egyptian Pound', code: 'EGP', symbol: '£'},
|
|
1225
|
+
{name: 'El Salvador Colon', code: 'SVC', symbol: '$'},
|
|
1226
|
+
{name: 'Nakfa', code: 'ERN'},
|
|
1227
|
+
{name: 'Lilangeni', code: 'SZL'},
|
|
1228
|
+
{name: 'Ethiopian Birr', code: 'ETB'},
|
|
1229
|
+
{name: 'Falkland Islands Pound', code: 'FKP', symbol: '£'},
|
|
1230
|
+
{name: 'Fiji Dollar', code: 'FJD', symbol: '$'},
|
|
1231
|
+
{name: 'CFP Franc', code: 'XPF'},
|
|
1232
|
+
{name: 'Dalasi', code: 'GMD'},
|
|
1233
|
+
{name: 'Lari', code: 'GEL'},
|
|
1234
|
+
{name: 'Ghana Cedi', code: 'GHS', symbol: '¢'},
|
|
1235
|
+
{name: 'Gibraltar Pound', code: 'GIP', symbol: '£'},
|
|
1236
|
+
{name: 'Quetzal', code: 'GTQ', symbol: 'Q'},
|
|
1237
|
+
{name: 'Pound Sterling', code: 'GBP', symbol: '£'},
|
|
1238
|
+
{name: 'Guinean Franc', code: 'GNF'},
|
|
1239
|
+
{name: 'Guyana Dollar', code: 'GYD', symbol: '$'},
|
|
1240
|
+
{name: 'Gourde', code: 'HTG'},
|
|
1241
|
+
{name: 'Lempira', code: 'HNL', symbol: 'L'},
|
|
1242
|
+
{name: 'Hong Kong Dollar', code: 'HKD', symbol: '$'},
|
|
1243
|
+
{name: 'Forint', code: 'HUF', symbol: 'Ft'},
|
|
1244
|
+
{name: 'Iceland Krona', code: 'ISK', symbol: 'kr'},
|
|
1245
|
+
{name: 'Rupiah', code: 'IDR', symbol: 'Rp'},
|
|
1246
|
+
{name: 'SDR (Special Drawing Right)', code: 'XDR'},
|
|
1247
|
+
{name: 'Iranian Rial', code: 'IRR', symbol: '﷼'},
|
|
1248
|
+
{name: 'Iraqi Dinar', code: 'IQD'},
|
|
1249
|
+
{name: 'New Israeli Sheqel', code: 'ILS', symbol: '₪'},
|
|
1250
|
+
{name: 'Jamaican Dollar', code: 'JMD', symbol: 'J$'},
|
|
1251
|
+
{name: 'Yen', code: 'JPY', symbol: '¥'},
|
|
1252
|
+
{name: 'Jordanian Dinar', code: 'JOD'},
|
|
1253
|
+
{name: 'Tenge', code: 'KZT', symbol: 'лв'},
|
|
1254
|
+
{name: 'Kenyan Shilling', code: 'KES'},
|
|
1255
|
+
{name: 'North Korean Won', code: 'KPW', symbol: '₩'},
|
|
1256
|
+
{name: 'Won', code: 'KRW', symbol: '₩'},
|
|
1257
|
+
{name: 'Kuwaiti Dinar', code: 'KWD'},
|
|
1258
|
+
{name: 'Som', code: 'KGS', symbol: 'лв'},
|
|
1259
|
+
{name: 'Lao Kip', code: 'LAK', symbol: '₭'},
|
|
1260
|
+
{name: 'Lebanese Pound', code: 'LBP', symbol: '£'},
|
|
1261
|
+
{name: 'Loti', code: 'LSL'},
|
|
1262
|
+
{name: 'Rand', code: 'ZAR', symbol: 'R'},
|
|
1263
|
+
{name: 'Liberian Dollar', code: 'LRD', symbol: '$'},
|
|
1264
|
+
{name: 'Libyan Dinar', code: 'LYD'},
|
|
1265
|
+
{name: 'Swiss Franc', code: 'CHF', symbol: 'CHF'},
|
|
1266
|
+
{name: 'Pataca', code: 'MOP'},
|
|
1267
|
+
{name: 'Denar', code: 'MKD', symbol: 'ден'},
|
|
1268
|
+
{name: 'Malagasy Ariary', code: 'MGA'},
|
|
1269
|
+
{name: 'Malawi Kwacha', code: 'MWK'},
|
|
1270
|
+
{name: 'Malaysian Ringgit', code: 'MYR', symbol: 'RM'},
|
|
1271
|
+
{name: 'Rufiyaa', code: 'MVR'},
|
|
1272
|
+
{name: 'Ouguiya', code: 'MRU'},
|
|
1273
|
+
{name: 'Mauritius Rupee', code: 'MUR', symbol: '₨'},
|
|
1274
|
+
{name: 'ADB Unit of Account', code: 'XUA'},
|
|
1275
|
+
{name: 'Mexican Peso', code: 'MXN', symbol: '$'},
|
|
1276
|
+
{name: 'Mexican Unidad de Inversion (UDI)', code: 'MXV'},
|
|
1277
|
+
{name: 'Moldovan Leu', code: 'MDL'},
|
|
1278
|
+
{name: 'Tugrik', code: 'MNT', symbol: '₮'},
|
|
1279
|
+
{name: 'Moroccan Dirham', code: 'MAD'},
|
|
1280
|
+
{name: 'Mozambique Metical', code: 'MZN', symbol: 'MT'},
|
|
1281
|
+
{name: 'Kyat', code: 'MMK'},
|
|
1282
|
+
{name: 'Namibia Dollar', code: 'NAD', symbol: '$'},
|
|
1283
|
+
{name: 'Nepalese Rupee', code: 'NPR', symbol: '₨'},
|
|
1284
|
+
{name: 'Cordoba Oro', code: 'NIO', symbol: 'C$'},
|
|
1285
|
+
{name: 'Naira', code: 'NGN', symbol: '₦'},
|
|
1286
|
+
{name: 'Rial Omani', code: 'OMR', symbol: '﷼'},
|
|
1287
|
+
{name: 'Pakistan Rupee', code: 'PKR', symbol: '₨'},
|
|
1288
|
+
{name: 'Balboa', code: 'PAB', symbol: 'B/.'},
|
|
1289
|
+
{name: 'Kina', code: 'PGK'},
|
|
1290
|
+
{name: 'Guarani', code: 'PYG', symbol: 'Gs'},
|
|
1291
|
+
{name: 'Sol', code: 'PEN', symbol: 'S/.'},
|
|
1292
|
+
{name: 'Philippine Peso', code: 'PHP', symbol: '₱'},
|
|
1293
|
+
{name: 'Zloty', code: 'PLN', symbol: 'zł'},
|
|
1294
|
+
{name: 'Qatari Rial', code: 'QAR', symbol: '﷼'},
|
|
1295
|
+
{name: 'Romanian Leu', code: 'RON', symbol: 'lei'},
|
|
1296
|
+
{name: 'Russian Ruble', code: 'RUB', symbol: '₽'},
|
|
1297
|
+
{name: 'Rwanda Franc', code: 'RWF'},
|
|
1298
|
+
{name: 'Saint Helena Pound', code: 'SHP', symbol: '£'},
|
|
1299
|
+
{name: 'Tala', code: 'WST'},
|
|
1300
|
+
{name: 'Dobra', code: 'STN'},
|
|
1301
|
+
{name: 'Saudi Riyal', code: 'SAR', symbol: '﷼'},
|
|
1302
|
+
{name: 'Serbian Dinar', code: 'RSD', symbol: 'Дин.'},
|
|
1303
|
+
{name: 'Seychelles Rupee', code: 'SCR', symbol: '₨'},
|
|
1304
|
+
{name: 'Leone', code: 'SLL'},
|
|
1305
|
+
{name: 'Singapore Dollar', code: 'SGD', symbol: '$'},
|
|
1306
|
+
{name: 'Sucre', code: 'XSU'},
|
|
1307
|
+
{name: 'Solomon Islands Dollar', code: 'SBD', symbol: '$'},
|
|
1308
|
+
{name: 'Somali Shilling', code: 'SOS', symbol: 'S'},
|
|
1309
|
+
{name: 'South Sudanese Pound', code: 'SSP'},
|
|
1310
|
+
{name: 'Sri Lanka Rupee', code: 'LKR', symbol: '₨'},
|
|
1311
|
+
{name: 'Sudanese Pound', code: 'SDG'},
|
|
1312
|
+
{name: 'Surinam Dollar', code: 'SRD', symbol: '$'},
|
|
1313
|
+
{name: 'Swedish Krona', code: 'SEK', symbol: 'kr'},
|
|
1314
|
+
{name: 'WIR Euro', code: 'CHE'},
|
|
1315
|
+
{name: 'WIR Franc', code: 'CHW'},
|
|
1316
|
+
{name: 'Syrian Pound', code: 'SYP', symbol: '£'},
|
|
1317
|
+
{name: 'New Taiwan Dollar', code: 'TWD', symbol: 'NT$'},
|
|
1318
|
+
{name: 'Somoni', code: 'TJS'},
|
|
1319
|
+
{name: 'Tanzanian Shilling', code: 'TZS'},
|
|
1320
|
+
{name: 'Baht', code: 'THB', symbol: '฿'},
|
|
1321
|
+
{name: 'Pa’anga', code: 'TOP'},
|
|
1322
|
+
{name: 'Trinidad and Tobago Dollar', code: 'TTD', symbol: 'TT$'},
|
|
1323
|
+
{name: 'Tunisian Dinar', code: 'TND'},
|
|
1324
|
+
{name: 'Turkish Lira', code: 'TRY', symbol: '₺'},
|
|
1325
|
+
{name: 'Turkmenistan New Manat', code: 'TMT'},
|
|
1326
|
+
{name: 'Uganda Shilling', code: 'UGX'},
|
|
1327
|
+
{name: 'Hryvnia', code: 'UAH', symbol: '₴'},
|
|
1328
|
+
{name: 'UAE Dirham', code: 'AED', symbol: ' د.إ'},
|
|
1329
|
+
{name: 'US Dollar (Next day)', code: 'USN'},
|
|
1330
|
+
{name: 'Peso Uruguayo', code: 'UYU', symbol: '$U'},
|
|
1331
|
+
{name: 'Uruguay Peso en Unidades Indexadas (UI)', code: 'UYI'},
|
|
1332
|
+
{name: 'Unidad Previsional', code: 'UYW'},
|
|
1333
|
+
{name: 'Uzbekistan Sum', code: 'UZS', symbol: 'лв'},
|
|
1334
|
+
{name: 'Vatu', code: 'VUV'},
|
|
1335
|
+
{name: 'Bolívar Soberano', code: 'VES'},
|
|
1336
|
+
{name: 'Bolívar Soberano', code: 'VED'},
|
|
1337
|
+
{name: 'Dong', code: 'VND', symbol: '₫'},
|
|
1338
|
+
{name: 'Yemeni Rial', code: 'YER', symbol: '﷼'},
|
|
1339
|
+
{name: 'Zambian Kwacha', code: 'ZMW'},
|
|
1340
|
+
{name: 'Zimbabwe Dollar', code: 'ZWL'},
|
|
1341
|
+
{name: 'Bond Markets Unit European Composite Unit (EURCO)', code: 'XBA'},
|
|
1342
|
+
{name: 'Bond Markets Unit European Monetary Unit (E.M.U.-6)', code: 'XBB'},
|
|
1343
|
+
{name: 'Bond Markets Unit European Unit of Account 9 (E.U.A.-9)', code: 'XBC'},
|
|
1344
|
+
{name: 'Bond Markets Unit European Unit of Account 17 (E.U.A.-17)', code: 'XBD'},
|
|
1345
|
+
{name: 'Codes specifically reserved for testing purposes', code: 'XTS'},
|
|
1346
|
+
{name: 'The codes assigned for transactions where no currency is involved', code: 'XXX'},
|
|
1347
|
+
{name: 'Gold', code: 'XAU'},
|
|
1348
|
+
{name: 'Palladium', code: 'XPD'},
|
|
1349
|
+
{name: 'Platinum', code: 'XPT'},
|
|
1350
|
+
{name: 'Silver', code: 'XAG'},
|
|
1351
|
+
]
|
|
1352
|
+
|
|
1158
1353
|
// if (!Element.prototype.scrollIntoViewIfNeeded) {
|
|
1159
1354
|
//Element.prototype.scrollIntoViewIfNeeded = function(centerIfNeeded) {
|
|
1160
1355
|
|