@takaro/lib-components 0.0.14 → 0.0.18
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/Dockerfile.dev +1 -1
- package/package.json +23 -24
- package/src/components/actions/Button/Button.test.tsx +2 -1
- package/src/components/actions/Button/__snapshots__/Button.test.tsx.snap +18 -0
- package/src/components/actions/Button/style.ts +1 -0
- package/src/components/actions/DropdownButton/index.tsx +51 -36
- package/src/components/actions/IconButton/IconButton.test.tsx +3 -2
- package/src/components/actions/IconButton/__snapshots__/IconButton.test.tsx.snap +18 -0
- package/src/components/actions/IconButton/getIconSize.ts +16 -0
- package/src/components/actions/IconButton/index.tsx +2 -16
- package/src/components/actions/ToggleButton/ToggleButtonGroup.tsx +0 -1
- package/src/components/charts/AreaChart/AreaChart.stories.tsx +15 -20
- package/src/components/charts/GeoMercator/GeoMercator.stories.tsx +24 -18
- package/src/components/charts/GeoMercator/index.tsx +158 -56
- package/src/components/charts/GeoMercator/iso3166-alpha2-to-alpha3.ts +250 -0
- package/src/components/charts/GeoMercator/world.json +333 -0
- package/src/components/charts/RadialBarChart/index.tsx +1 -1
- package/src/components/charts/ZoomControls.tsx +47 -0
- package/src/components/charts/index.tsx +3 -0
- package/src/components/data/Chip/Chip.test.tsx +3 -2
- package/src/components/data/Chip/__snapshots__/Chip.test.tsx.snap +38 -0
- package/src/components/data/Console/Console.tsx +1 -7
- package/src/components/data/Console/ConsoleLine/index.tsx +1 -1
- package/src/components/data/Console/constants.ts +6 -0
- package/src/components/data/Table/index.tsx +31 -2
- package/src/components/data/Table/subcomponents/Filter/field.tsx +2 -3
- package/src/components/data/Table/subcomponents/Filter/index.tsx +1 -11
- package/src/components/data/Table/subcomponents/Filter/types.ts +10 -0
- package/src/components/data/Table/subcomponents/Pagination/PageSizeSelect.tsx +0 -1
- package/src/components/data/index.ts +0 -3
- package/src/components/dialogs/Dialog/DialogBody.tsx +1 -0
- package/src/components/dialogs/Dialog/DialogContent.tsx +1 -5
- package/src/components/feedback/Alert/Alert.stories.tsx +1 -10
- package/src/components/feedback/Alert/Alert.test.tsx +2 -1
- package/src/components/feedback/Alert/__snapshots__/Alert.test.tsx.snap +44 -0
- package/src/components/feedback/Alert/index.tsx +11 -15
- package/src/components/feedback/Alert/style.ts +9 -11
- package/src/components/feedback/ErrorPage/index.tsx +1 -1
- package/src/components/feedback/IconTooltip/IconTooltip.stories.tsx +22 -0
- package/src/components/feedback/IconTooltip/index.tsx +50 -0
- package/src/components/feedback/Loaders/Loading.test.tsx +2 -1
- package/src/components/feedback/Loaders/Spinner.test.tsx +2 -1
- package/src/components/feedback/Loaders/__snapshots__/Loading.test.tsx.snap +141 -0
- package/src/components/feedback/Loaders/__snapshots__/Spinner.test.tsx.snap +10 -0
- package/src/components/feedback/NetworkDetector/NetworkDetector.test.tsx +2 -1
- package/src/components/feedback/NetworkDetector/__snapshots__/NetworkDetector.test.tsx.snap +3 -0
- package/src/components/feedback/NotificationBanner/NotificationBanner.test.tsx +2 -1
- package/src/components/feedback/NotificationBanner/__snapshots__/NotificationBanner.test.tsx.snap +3 -0
- package/src/components/feedback/ProgressBar/ProgressBar.stories.tsx +2 -1
- package/src/components/feedback/ProgressBar/index.tsx +58 -24
- package/src/components/feedback/Skeleton/Skeleton.test.tsx +2 -1
- package/src/components/feedback/Skeleton/__snapshots__/Skeleton.test.tsx.snap +9 -0
- package/src/components/feedback/Tooltip/TooltipContent.tsx +2 -2
- package/src/components/feedback/Tooltip/useTooltip.tsx +3 -0
- package/src/components/feedback/index.ts +2 -1
- package/src/components/feedback/snacks/Drawer/Drawer.stories.tsx +1 -1
- package/src/components/feedback/snacks/Drawer/index.tsx +19 -4
- package/src/components/inputs/Date/DateRangePicker/Context.tsx +1 -1
- package/src/components/inputs/Date/DateRangePicker/Generic.tsx +2 -1
- package/src/components/inputs/Date/DateRangePicker/QuickSelect/index.tsx +1 -17
- package/src/components/inputs/Date/subcomponents/RelativePicker/index.tsx +1 -17
- package/src/components/inputs/Date/types.ts +14 -0
- package/src/components/inputs/DurationField/Generic.tsx +0 -1
- package/src/components/inputs/TextField/Controlled.tsx +1 -1
- package/src/components/inputs/TextField/Generic.tsx +79 -56
- package/src/components/inputs/TextField/TextField.stories.tsx +21 -1
- package/src/components/inputs/TextField/style.ts +6 -0
- package/src/components/inputs/TextField/util.ts +7 -2
- package/src/components/inputs/index.ts +1 -0
- package/src/components/inputs/layout/Description.tsx +0 -5
- package/src/components/inputs/layout/Label/style.ts +0 -1
- package/src/components/inputs/layout/index.ts +3 -1
- package/src/components/inputs/layout/setAriaDescribedBy.ts +3 -0
- package/src/components/inputs/selects/SelectField/Controlled.tsx +0 -2
- package/src/components/inputs/selects/SelectField/Generic/index.tsx +11 -14
- package/src/components/inputs/selects/SelectQueryField/Controlled.tsx +2 -2
- package/src/components/inputs/selects/SelectQueryField/Generic/index.tsx +134 -54
- package/src/components/inputs/selects/SelectQueryField/style.ts +0 -1
- package/src/components/inputs/selects/SubComponents/Option.tsx +1 -1
- package/src/components/inputs/selects/sharedStyle.ts +0 -2
- package/src/components/layout/Container/index.ts +1 -1
- package/src/components/layout/index.ts +1 -1
- package/src/components/navigation/HorizontalNav/HorizontalNav.stories.tsx +6 -22
- package/src/components/navigation/HorizontalNav/index.tsx +1 -1
- package/src/components/navigation/HorizontalNav/style.ts +28 -3
- package/src/components/navigation/Steppers/SlimStepper/Stepper.stories.tsx +2 -1
- package/src/components/navigation/Steppers/SlimStepper/index.tsx +4 -4
- package/src/components/navigation/Steppers/Stepper/Stepper.stories.tsx +2 -1
- package/src/components/navigation/Steppers/Stepper/index.tsx +4 -4
- package/src/components/navigation/Steppers/context.tsx +2 -49
- package/src/components/navigation/Steppers/provider.tsx +18 -0
- package/src/components/navigation/Steppers/useStepper.ts +34 -0
- package/src/components/navigation/index.ts +2 -1
- package/src/components/other/ActionMenu/index.tsx +20 -11
- package/src/components/other/ActionMenu/style.ts +2 -2
- package/src/components/other/ClipBoard/ClipBoard.test.tsx +2 -1
- package/src/components/other/ClipBoard/__snapshots__/ClipBoard.test.tsx.snap +36 -0
- package/src/components/other/Empty/Empty.test.tsx +5 -2
- package/src/components/other/Empty/__snapshots__/Empty.test.tsx.snap +21 -0
- package/src/components/other/PermissionsGuard/hasPermissionsHelper.ts +18 -0
- package/src/components/other/PermissionsGuard/index.tsx +1 -17
- package/src/components/other/Plan/Plan.stories.tsx +21 -0
- package/src/components/other/Plan/index.tsx +93 -0
- package/src/components/other/Plan/style.ts +61 -0
- package/src/components/other/Usage/Usage.stories.tsx +21 -0
- package/src/components/other/Usage/Usage.tsx +35 -0
- package/src/components/other/Usage/UsageCard.stories.tsx +31 -0
- package/src/components/other/Usage/UsageCard.tsx +88 -0
- package/src/components/other/index.ts +10 -2
- package/src/components/visual/Card/Card.stories.tsx +4 -1
- package/src/components/visual/Card/CardBody.tsx +11 -0
- package/src/components/visual/Card/CardTitle.tsx +23 -0
- package/src/components/visual/Card/index.tsx +19 -9
- package/src/components/visual/Divider/Divider.test.tsx +2 -1
- package/src/components/visual/Divider/__snapshots__/Divider.test.tsx.snap +13 -0
- package/src/components/visual/Divider/index.tsx +9 -6
- package/src/errors/errors.ts +1 -1
- package/src/helpers/regexprs.ts +2 -1
- package/tsconfig.json +0 -5
- package/vite.config.mts +17 -0
- package/src/components/data/LinkCard/index.tsx +0 -28
- package/src/components/feedback/QuestionTooltip/QuestionTooltip.stories.tsx +0 -20
- package/src/components/feedback/QuestionTooltip/index.tsx +0 -35
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import * as topojson from 'topojson-client';
|
|
2
2
|
import topology from './world.json';
|
|
3
3
|
import { Graticule, Mercator } from '@visx/geo';
|
|
4
|
+
import { scaleLinear } from '@visx/scale';
|
|
4
5
|
import { ParentSize } from '@visx/responsive';
|
|
5
6
|
|
|
6
7
|
import { getDefaultTooltipStyles, InnerChartProps, Margin } from '../util';
|
|
7
8
|
import { useTheme } from '../../../hooks';
|
|
8
9
|
import { useTooltip, Tooltip } from '@visx/tooltip';
|
|
10
|
+
import { Zoom } from '@visx/zoom';
|
|
9
11
|
import { useCallback } from 'react';
|
|
10
12
|
import { localPoint } from '@visx/event';
|
|
11
|
-
import {
|
|
13
|
+
import { ZoomControls } from '../ZoomControls';
|
|
14
|
+
import { alpha2ToAlpha3 } from './iso3166-alpha2-to-alpha3';
|
|
12
15
|
|
|
13
16
|
interface FeatureShape {
|
|
14
17
|
type: 'Feature';
|
|
@@ -28,11 +31,14 @@ export interface GeoMercatorProps<T> {
|
|
|
28
31
|
name: string;
|
|
29
32
|
data: T[];
|
|
30
33
|
margin?: Margin;
|
|
31
|
-
xAccessor: (d: T) => string;
|
|
32
|
-
yAccessor: (d: T) => number;
|
|
34
|
+
xAccessor: (d: T) => string;
|
|
35
|
+
yAccessor: (d: T) => number;
|
|
33
36
|
tooltipAccessor?: (d: T) => string;
|
|
37
|
+
showZoomControls?: boolean;
|
|
38
|
+
allowZoomAndDrag?: boolean;
|
|
34
39
|
}
|
|
35
40
|
|
|
41
|
+
type InnerGeoMercator<T> = InnerChartProps & GeoMercatorProps<T>;
|
|
36
42
|
const defaultMargin = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
37
43
|
export const GeoMercator = <T,>({
|
|
38
44
|
data,
|
|
@@ -41,46 +47,51 @@ export const GeoMercator = <T,>({
|
|
|
41
47
|
name,
|
|
42
48
|
margin = defaultMargin,
|
|
43
49
|
tooltipAccessor,
|
|
50
|
+
showZoomControls = false,
|
|
51
|
+
allowZoomAndDrag = false,
|
|
44
52
|
}: GeoMercatorProps<T>) => {
|
|
45
53
|
return (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
<ParentSize>
|
|
55
|
+
{(parent) => (
|
|
56
|
+
<Chart<T>
|
|
57
|
+
name={name}
|
|
58
|
+
data={data}
|
|
59
|
+
width={parent.width}
|
|
60
|
+
height={parent.height}
|
|
61
|
+
margin={margin}
|
|
62
|
+
yAccessor={yAccessor}
|
|
63
|
+
xAccessor={xAccessor}
|
|
64
|
+
allowZoomAndDrag={allowZoomAndDrag}
|
|
65
|
+
showZoomControls={showZoomControls}
|
|
66
|
+
tooltipAccessor={tooltipAccessor}
|
|
67
|
+
/>
|
|
68
|
+
)}
|
|
69
|
+
</ParentSize>
|
|
62
70
|
);
|
|
63
71
|
};
|
|
64
72
|
|
|
65
|
-
type InnerGeoMercator<T> = InnerChartProps & GeoMercatorProps<T>;
|
|
66
|
-
|
|
67
73
|
const Chart = <T,>({
|
|
68
74
|
width,
|
|
75
|
+
height,
|
|
69
76
|
yAccessor,
|
|
70
77
|
xAccessor,
|
|
71
78
|
data,
|
|
72
79
|
tooltipAccessor,
|
|
73
80
|
name,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
InnerGeoMercator<T>) => {
|
|
81
|
+
allowZoomAndDrag,
|
|
82
|
+
showZoomControls,
|
|
83
|
+
}: InnerGeoMercator<T>) => {
|
|
78
84
|
const theme = useTheme();
|
|
79
85
|
const { hideTooltip, showTooltip, tooltipData, tooltipLeft = 0, tooltipTop = 0 } = useTooltip<T>();
|
|
80
86
|
|
|
81
87
|
const centerX = width / 2;
|
|
82
88
|
const centerY = height / 2;
|
|
83
|
-
const scale = (width
|
|
89
|
+
const scale = Math.min(width, height) * 0.25;
|
|
90
|
+
|
|
91
|
+
const colorScale = scaleLinear({
|
|
92
|
+
domain: [Math.min(...data.map((d) => yAccessor(d))), Math.max(...data.map((d) => yAccessor(d)))],
|
|
93
|
+
range: [theme.colors.backgroundAlt, theme.colors.primary],
|
|
94
|
+
});
|
|
84
95
|
|
|
85
96
|
const handleTooltip = useCallback(
|
|
86
97
|
(event: React.TouchEvent<SVGPathElement> | React.MouseEvent<SVGPathElement>, countryData: T | undefined) => {
|
|
@@ -89,40 +100,131 @@ InnerGeoMercator<T>) => {
|
|
|
89
100
|
showTooltip({
|
|
90
101
|
tooltipData: countryData,
|
|
91
102
|
tooltipLeft: eventSvgCoords?.x,
|
|
92
|
-
tooltipTop: eventSvgCoords
|
|
103
|
+
tooltipTop: eventSvgCoords ? eventSvgCoords.y - 38 : undefined,
|
|
93
104
|
});
|
|
94
105
|
},
|
|
95
|
-
[
|
|
106
|
+
[showTooltip],
|
|
96
107
|
);
|
|
97
108
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
const renderMap = (zoom?: {
|
|
110
|
+
containerRef: React.RefObject<SVGSVGElement>;
|
|
111
|
+
isDragging: boolean;
|
|
112
|
+
dragStart: any;
|
|
113
|
+
dragMove: any;
|
|
114
|
+
dragEnd: any;
|
|
115
|
+
transformMatrix: { scaleX: number; translateX: number; translateY: number };
|
|
116
|
+
}) => (
|
|
117
|
+
<svg
|
|
118
|
+
id={name}
|
|
119
|
+
name={name}
|
|
120
|
+
width={width}
|
|
121
|
+
height={height}
|
|
122
|
+
ref={zoom?.containerRef}
|
|
123
|
+
style={{
|
|
124
|
+
touchAction: 'none',
|
|
125
|
+
cursor: allowZoomAndDrag && zoom ? (zoom.isDragging ? 'grabbing' : 'grab') : 'default',
|
|
126
|
+
}}
|
|
127
|
+
>
|
|
128
|
+
<rect x={0} y={0} width={width} height={height} fill={theme.colors.background} rx={10} />
|
|
129
|
+
<Mercator<FeatureShape>
|
|
130
|
+
data={world.features}
|
|
131
|
+
scale={zoom?.transformMatrix.scaleX || scale}
|
|
132
|
+
translate={[zoom?.transformMatrix.translateX || centerX, zoom?.transformMatrix.translateY || centerY]}
|
|
133
|
+
>
|
|
134
|
+
{(mercator) => (
|
|
135
|
+
<g>
|
|
136
|
+
<Graticule graticule={(g) => mercator.path(g) || ''} stroke="rgba(33,33,33,0.05)" />
|
|
137
|
+
{mercator.features.map(({ feature, path }, i) => {
|
|
138
|
+
const countryData = data.find((d) => {
|
|
139
|
+
// If alpha2 , try to convert it to aplha3.
|
|
140
|
+
// Since world.json only has support for alpha3.
|
|
141
|
+
if (xAccessor(d).length === 2) {
|
|
142
|
+
return alpha2ToAlpha3[xAccessor(d)] === feature.id;
|
|
143
|
+
}
|
|
144
|
+
return xAccessor(d) === feature.id;
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const fillColor = countryData ? colorScale(yAccessor(countryData)) : theme.colors.backgroundAlt;
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<path
|
|
151
|
+
key={`map-feature-${i}`}
|
|
152
|
+
d={path || ''}
|
|
153
|
+
stroke={theme.colors.backgroundAccent}
|
|
154
|
+
strokeWidth={0.35}
|
|
155
|
+
fill={fillColor}
|
|
156
|
+
onMouseLeave={hideTooltip}
|
|
157
|
+
onMouseMove={(e) => handleTooltip(e, countryData)}
|
|
158
|
+
onTouchStart={(e) => handleTooltip(e, countryData)}
|
|
159
|
+
onTouchMove={(e) => handleTooltip(e, countryData)}
|
|
160
|
+
/>
|
|
161
|
+
);
|
|
162
|
+
})}
|
|
163
|
+
</g>
|
|
164
|
+
)}
|
|
165
|
+
</Mercator>
|
|
166
|
+
{allowZoomAndDrag && zoom && (
|
|
167
|
+
<rect
|
|
168
|
+
x={0}
|
|
169
|
+
y={0}
|
|
170
|
+
width={width}
|
|
171
|
+
height={height}
|
|
172
|
+
rx={14}
|
|
173
|
+
fill="transparent"
|
|
174
|
+
onTouchStart={zoom.dragStart}
|
|
175
|
+
onTouchMove={zoom.dragMove}
|
|
176
|
+
onTouchEnd={zoom.dragEnd}
|
|
177
|
+
onMouseDown={zoom.dragStart}
|
|
178
|
+
onMouseMove={zoom.dragMove}
|
|
179
|
+
onMouseUp={zoom.dragEnd}
|
|
180
|
+
onMouseLeave={() => {
|
|
181
|
+
if (zoom.isDragging) zoom.dragEnd();
|
|
182
|
+
}}
|
|
183
|
+
/>
|
|
184
|
+
)}
|
|
185
|
+
</svg>
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
return allowZoomAndDrag ? (
|
|
189
|
+
<Zoom<SVGSVGElement>
|
|
190
|
+
width={width}
|
|
191
|
+
height={height}
|
|
192
|
+
scaleXMin={100}
|
|
193
|
+
scaleXMax={1000}
|
|
194
|
+
scaleYMin={100}
|
|
195
|
+
scaleYMax={1000}
|
|
196
|
+
initialTransformMatrix={{
|
|
197
|
+
scaleX: scale,
|
|
198
|
+
scaleY: scale,
|
|
199
|
+
translateX: centerX,
|
|
200
|
+
translateY: centerY,
|
|
201
|
+
skewX: 0,
|
|
202
|
+
skewY: 0,
|
|
203
|
+
}}
|
|
204
|
+
>
|
|
205
|
+
{(zoom) => (
|
|
206
|
+
<div style={{ position: 'relative' }}>
|
|
207
|
+
{renderMap(zoom)}
|
|
208
|
+
{showZoomControls && <ZoomControls zoom={zoom} />}
|
|
209
|
+
{tooltipData && (
|
|
210
|
+
<Tooltip
|
|
211
|
+
top={tooltipTop}
|
|
212
|
+
left={tooltipLeft}
|
|
213
|
+
style={{
|
|
214
|
+
...getDefaultTooltipStyles(theme),
|
|
215
|
+
textAlign: 'center',
|
|
216
|
+
transform: 'translate(-50%)',
|
|
217
|
+
}}
|
|
218
|
+
>
|
|
219
|
+
{tooltipAccessor ? tooltipAccessor(tooltipData) : `${xAccessor(tooltipData)}: ${yAccessor(tooltipData)}`}
|
|
220
|
+
</Tooltip>
|
|
123
221
|
)}
|
|
124
|
-
</
|
|
125
|
-
|
|
222
|
+
</div>
|
|
223
|
+
)}
|
|
224
|
+
</Zoom>
|
|
225
|
+
) : (
|
|
226
|
+
<div style={{ position: 'relative' }}>
|
|
227
|
+
{renderMap()}
|
|
126
228
|
{tooltipData && (
|
|
127
229
|
<Tooltip
|
|
128
230
|
top={tooltipTop}
|
|
@@ -136,6 +238,6 @@ InnerGeoMercator<T>) => {
|
|
|
136
238
|
{tooltipAccessor ? tooltipAccessor(tooltipData) : `${xAccessor(tooltipData)}: ${yAccessor(tooltipData)}`}
|
|
137
239
|
</Tooltip>
|
|
138
240
|
)}
|
|
139
|
-
|
|
241
|
+
</div>
|
|
140
242
|
);
|
|
141
243
|
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
export const alpha2ToAlpha3: Record<string, string> = {
|
|
2
|
+
AF: 'AFG',
|
|
3
|
+
AX: 'ALA',
|
|
4
|
+
AL: 'ALB',
|
|
5
|
+
DZ: 'DZA',
|
|
6
|
+
AS: 'ASM',
|
|
7
|
+
AD: 'AND',
|
|
8
|
+
AO: 'AGO',
|
|
9
|
+
AI: 'AIA',
|
|
10
|
+
AQ: 'ATA',
|
|
11
|
+
AG: 'ATG',
|
|
12
|
+
AR: 'ARG',
|
|
13
|
+
AM: 'ARM',
|
|
14
|
+
AW: 'ABW',
|
|
15
|
+
AU: 'AUS',
|
|
16
|
+
AT: 'AUT',
|
|
17
|
+
AZ: 'AZE',
|
|
18
|
+
BS: 'BHS',
|
|
19
|
+
BH: 'BHR',
|
|
20
|
+
BD: 'BGD',
|
|
21
|
+
BB: 'BRB',
|
|
22
|
+
BY: 'BLR',
|
|
23
|
+
BE: 'BEL',
|
|
24
|
+
BZ: 'BLZ',
|
|
25
|
+
BJ: 'BEN',
|
|
26
|
+
BM: 'BMU',
|
|
27
|
+
BT: 'BTN',
|
|
28
|
+
BO: 'BOL',
|
|
29
|
+
BA: 'BIH',
|
|
30
|
+
BW: 'BWA',
|
|
31
|
+
BV: 'BVT',
|
|
32
|
+
BR: 'BRA',
|
|
33
|
+
VG: 'VGB',
|
|
34
|
+
IO: 'IOT',
|
|
35
|
+
BN: 'BRN',
|
|
36
|
+
BG: 'BGR',
|
|
37
|
+
BF: 'BFA',
|
|
38
|
+
BI: 'BDI',
|
|
39
|
+
KH: 'KHM',
|
|
40
|
+
CM: 'CMR',
|
|
41
|
+
CA: 'CAN',
|
|
42
|
+
CV: 'CPV',
|
|
43
|
+
KY: 'CYM',
|
|
44
|
+
CF: 'CAF',
|
|
45
|
+
TD: 'TCD',
|
|
46
|
+
CL: 'CHL',
|
|
47
|
+
CN: 'CHN',
|
|
48
|
+
HK: 'HKG',
|
|
49
|
+
MO: 'MAC',
|
|
50
|
+
CX: 'CXR',
|
|
51
|
+
CC: 'CCK',
|
|
52
|
+
CO: 'COL',
|
|
53
|
+
KM: 'COM',
|
|
54
|
+
CG: 'COG',
|
|
55
|
+
CD: 'COD',
|
|
56
|
+
CK: 'COK',
|
|
57
|
+
CR: 'CRI',
|
|
58
|
+
CI: 'CIV',
|
|
59
|
+
HR: 'HRV',
|
|
60
|
+
CU: 'CUB',
|
|
61
|
+
CY: 'CYP',
|
|
62
|
+
CZ: 'CZE',
|
|
63
|
+
DK: 'DNK',
|
|
64
|
+
DJ: 'DJI',
|
|
65
|
+
DM: 'DMA',
|
|
66
|
+
DO: 'DOM',
|
|
67
|
+
EC: 'ECU',
|
|
68
|
+
EG: 'EGY',
|
|
69
|
+
SV: 'SLV',
|
|
70
|
+
GQ: 'GNQ',
|
|
71
|
+
ER: 'ERI',
|
|
72
|
+
EE: 'EST',
|
|
73
|
+
ET: 'ETH',
|
|
74
|
+
FK: 'FLK',
|
|
75
|
+
FO: 'FRO',
|
|
76
|
+
FJ: 'FJI',
|
|
77
|
+
FI: 'FIN',
|
|
78
|
+
FR: 'FRA',
|
|
79
|
+
GF: 'GUF',
|
|
80
|
+
PF: 'PYF',
|
|
81
|
+
TF: 'ATF',
|
|
82
|
+
GA: 'GAB',
|
|
83
|
+
GM: 'GMB',
|
|
84
|
+
GE: 'GEO',
|
|
85
|
+
DE: 'DEU',
|
|
86
|
+
GH: 'GHA',
|
|
87
|
+
GI: 'GIB',
|
|
88
|
+
GR: 'GRC',
|
|
89
|
+
GL: 'GRL',
|
|
90
|
+
GD: 'GRD',
|
|
91
|
+
GP: 'GLP',
|
|
92
|
+
GU: 'GUM',
|
|
93
|
+
GT: 'GTM',
|
|
94
|
+
GG: 'GGY',
|
|
95
|
+
GN: 'GIN',
|
|
96
|
+
GW: 'GNB',
|
|
97
|
+
GY: 'GUY',
|
|
98
|
+
HT: 'HTI',
|
|
99
|
+
HM: 'HMD',
|
|
100
|
+
VA: 'VAT',
|
|
101
|
+
HN: 'HND',
|
|
102
|
+
HU: 'HUN',
|
|
103
|
+
IS: 'ISL',
|
|
104
|
+
IN: 'IND',
|
|
105
|
+
ID: 'IDN',
|
|
106
|
+
IR: 'IRN',
|
|
107
|
+
IQ: 'IRQ',
|
|
108
|
+
IE: 'IRL',
|
|
109
|
+
IM: 'IMN',
|
|
110
|
+
IL: 'ISR',
|
|
111
|
+
IT: 'ITA',
|
|
112
|
+
JM: 'JAM',
|
|
113
|
+
JP: 'JPN',
|
|
114
|
+
JE: 'JEY',
|
|
115
|
+
JO: 'JOR',
|
|
116
|
+
KZ: 'KAZ',
|
|
117
|
+
KE: 'KEN',
|
|
118
|
+
KI: 'KIR',
|
|
119
|
+
KP: 'PRK',
|
|
120
|
+
KR: 'KOR',
|
|
121
|
+
KW: 'KWT',
|
|
122
|
+
KG: 'KGZ',
|
|
123
|
+
LA: 'LAO',
|
|
124
|
+
LV: 'LVA',
|
|
125
|
+
LB: 'LBN',
|
|
126
|
+
LS: 'LSO',
|
|
127
|
+
LR: 'LBR',
|
|
128
|
+
LY: 'LBY',
|
|
129
|
+
LI: 'LIE',
|
|
130
|
+
LT: 'LTU',
|
|
131
|
+
LU: 'LUX',
|
|
132
|
+
MK: 'MKD',
|
|
133
|
+
MG: 'MDG',
|
|
134
|
+
MW: 'MWI',
|
|
135
|
+
MY: 'MYS',
|
|
136
|
+
MV: 'MDV',
|
|
137
|
+
ML: 'MLI',
|
|
138
|
+
MT: 'MLT',
|
|
139
|
+
MH: 'MHL',
|
|
140
|
+
MQ: 'MTQ',
|
|
141
|
+
MR: 'MRT',
|
|
142
|
+
MU: 'MUS',
|
|
143
|
+
YT: 'MYT',
|
|
144
|
+
MX: 'MEX',
|
|
145
|
+
FM: 'FSM',
|
|
146
|
+
MD: 'MDA',
|
|
147
|
+
MC: 'MCO',
|
|
148
|
+
MN: 'MNG',
|
|
149
|
+
ME: 'MNE',
|
|
150
|
+
MS: 'MSR',
|
|
151
|
+
MA: 'MAR',
|
|
152
|
+
MZ: 'MOZ',
|
|
153
|
+
MM: 'MMR',
|
|
154
|
+
NA: 'NAM',
|
|
155
|
+
NR: 'NRU',
|
|
156
|
+
NP: 'NPL',
|
|
157
|
+
NL: 'NLD',
|
|
158
|
+
AN: 'ANT',
|
|
159
|
+
NC: 'NCL',
|
|
160
|
+
NZ: 'NZL',
|
|
161
|
+
NI: 'NIC',
|
|
162
|
+
NE: 'NER',
|
|
163
|
+
NG: 'NGA',
|
|
164
|
+
NU: 'NIU',
|
|
165
|
+
NF: 'NFK',
|
|
166
|
+
MP: 'MNP',
|
|
167
|
+
NO: 'NOR',
|
|
168
|
+
OM: 'OMN',
|
|
169
|
+
PK: 'PAK',
|
|
170
|
+
PW: 'PLW',
|
|
171
|
+
PS: 'PSE',
|
|
172
|
+
PA: 'PAN',
|
|
173
|
+
PG: 'PNG',
|
|
174
|
+
PY: 'PRY',
|
|
175
|
+
PE: 'PER',
|
|
176
|
+
PH: 'PHL',
|
|
177
|
+
PN: 'PCN',
|
|
178
|
+
PL: 'POL',
|
|
179
|
+
PT: 'PRT',
|
|
180
|
+
PR: 'PRI',
|
|
181
|
+
QA: 'QAT',
|
|
182
|
+
RE: 'REU',
|
|
183
|
+
RO: 'ROU',
|
|
184
|
+
RU: 'RUS',
|
|
185
|
+
RW: 'RWA',
|
|
186
|
+
BL: 'BLM',
|
|
187
|
+
SH: 'SHN',
|
|
188
|
+
KN: 'KNA',
|
|
189
|
+
LC: 'LCA',
|
|
190
|
+
MF: 'MAF',
|
|
191
|
+
PM: 'SPM',
|
|
192
|
+
VC: 'VCT',
|
|
193
|
+
WS: 'WSM',
|
|
194
|
+
SM: 'SMR',
|
|
195
|
+
ST: 'STP',
|
|
196
|
+
SA: 'SAU',
|
|
197
|
+
SN: 'SEN',
|
|
198
|
+
RS: 'SRB',
|
|
199
|
+
SC: 'SYC',
|
|
200
|
+
SL: 'SLE',
|
|
201
|
+
SG: 'SGP',
|
|
202
|
+
SK: 'SVK',
|
|
203
|
+
SI: 'SVN',
|
|
204
|
+
SB: 'SLB',
|
|
205
|
+
SO: 'SOM',
|
|
206
|
+
ZA: 'ZAF',
|
|
207
|
+
GS: 'SGS',
|
|
208
|
+
SS: 'SSD',
|
|
209
|
+
ES: 'ESP',
|
|
210
|
+
LK: 'LKA',
|
|
211
|
+
SD: 'SDN',
|
|
212
|
+
SR: 'SUR',
|
|
213
|
+
SJ: 'SJM',
|
|
214
|
+
SZ: 'SWZ',
|
|
215
|
+
SE: 'SWE',
|
|
216
|
+
CH: 'CHE',
|
|
217
|
+
SY: 'SYR',
|
|
218
|
+
TW: 'TWN',
|
|
219
|
+
TJ: 'TJK',
|
|
220
|
+
TZ: 'TZA',
|
|
221
|
+
TH: 'THA',
|
|
222
|
+
TL: 'TLS',
|
|
223
|
+
TG: 'TGO',
|
|
224
|
+
TK: 'TKL',
|
|
225
|
+
TO: 'TON',
|
|
226
|
+
TT: 'TTO',
|
|
227
|
+
TN: 'TUN',
|
|
228
|
+
TR: 'TUR',
|
|
229
|
+
TM: 'TKM',
|
|
230
|
+
TC: 'TCA',
|
|
231
|
+
TV: 'TUV',
|
|
232
|
+
UG: 'UGA',
|
|
233
|
+
UA: 'UKR',
|
|
234
|
+
AE: 'ARE',
|
|
235
|
+
GB: 'GBR',
|
|
236
|
+
US: 'USA',
|
|
237
|
+
UM: 'UMI',
|
|
238
|
+
UY: 'URY',
|
|
239
|
+
UZ: 'UZB',
|
|
240
|
+
VU: 'VUT',
|
|
241
|
+
VE: 'VEN',
|
|
242
|
+
VN: 'VNM',
|
|
243
|
+
VI: 'VIR',
|
|
244
|
+
WF: 'WLF',
|
|
245
|
+
EH: 'ESH',
|
|
246
|
+
YE: 'YEM',
|
|
247
|
+
ZM: 'ZMB',
|
|
248
|
+
ZW: 'ZWE',
|
|
249
|
+
XK: 'XKX',
|
|
250
|
+
};
|