@dra2020/dra-types 1.8.147 → 1.8.149
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/dist/all.d.ts +2 -0
- package/dist/datasource.d.ts +13 -0
- package/dist/dra-types.js +71 -1
- package/dist/dra-types.js.map +1 -1
- package/lib/all.ts +2 -0
- package/lib/datasource.ts +74 -0
- package/package.json +2 -2
package/lib/all.ts
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export function dxBaseCycle(dx: string): string
|
|
2
|
+
{
|
|
3
|
+
return dx === '2016_BG' ? '2010_VD' : dx
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export function dxValid(dx: string): string
|
|
7
|
+
{
|
|
8
|
+
switch (dx)
|
|
9
|
+
{
|
|
10
|
+
case '2010_VD':
|
|
11
|
+
case '2016_BG':
|
|
12
|
+
case '2020_VD':
|
|
13
|
+
case '2030_VD':
|
|
14
|
+
return dx;
|
|
15
|
+
default:
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface SupportMap
|
|
21
|
+
{
|
|
22
|
+
dataset: boolean,
|
|
23
|
+
blockediting: boolean,
|
|
24
|
+
citypainting: boolean,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const Support: { [dx: string]: SupportMap } =
|
|
28
|
+
{
|
|
29
|
+
['2010_VD']:
|
|
30
|
+
{
|
|
31
|
+
dataset: false,
|
|
32
|
+
blockediting: false,
|
|
33
|
+
citypainting: false,
|
|
34
|
+
},
|
|
35
|
+
['2016_BG']:
|
|
36
|
+
{
|
|
37
|
+
dataset: false,
|
|
38
|
+
blockediting: false,
|
|
39
|
+
citypainting: false,
|
|
40
|
+
},
|
|
41
|
+
['2020_VD']:
|
|
42
|
+
{
|
|
43
|
+
dataset: true,
|
|
44
|
+
blockediting: true,
|
|
45
|
+
citypainting: true,
|
|
46
|
+
},
|
|
47
|
+
['2030_VD']:
|
|
48
|
+
{
|
|
49
|
+
dataset: true,
|
|
50
|
+
blockediting: true,
|
|
51
|
+
citypainting: true,
|
|
52
|
+
},
|
|
53
|
+
['']:
|
|
54
|
+
{
|
|
55
|
+
dataset: false,
|
|
56
|
+
blockediting: false,
|
|
57
|
+
citypainting: false,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export function dxSupportsDataset(dx: string): boolean
|
|
62
|
+
{
|
|
63
|
+
return Support[dxValid(dx)].dataset
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function dxSupportsBlockediting(dx: string): boolean
|
|
67
|
+
{
|
|
68
|
+
return Support[dxValid(dx)].blockediting
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function dxSupportsCitypainting(dx: string): boolean
|
|
72
|
+
{
|
|
73
|
+
return Support[dxValid(dx)].citypainting
|
|
74
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dra2020/dra-types",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.149",
|
|
4
4
|
"description": "Shared types used between client, server and tools.",
|
|
5
5
|
"main": "dist/dra-types.js",
|
|
6
6
|
"types": "./dist/all.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"webpack-cli": "^5.1.4"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@dra2020/baseclient": "^1.0.
|
|
39
|
+
"@dra2020/baseclient": "^1.0.166",
|
|
40
40
|
"geojson": "^0.5.0",
|
|
41
41
|
"object-hash": "^3.0.0"
|
|
42
42
|
}
|