@cellaware/utils 5.4.12 → 5.4.14
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/azure/cosmos.js +35 -19
- package/dist/chatwms/product.d.ts +0 -12
- package/dist/chatwms/product.js +1 -4
- package/package.json +1 -1
package/dist/azure/cosmos.js
CHANGED
|
@@ -6,28 +6,44 @@ const COSMOS_TIMESTAMP_DATETIME = `TimestampToDateTime(c._ts*1000)`;
|
|
|
6
6
|
* All Cosmos timestamps are UTC.
|
|
7
7
|
* https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
8
8
|
*/
|
|
9
|
+
const TIME_ZONE_OFFSETS = {
|
|
10
|
+
// North America:
|
|
11
|
+
'America/New_York': -5, 'America/New_York_DST': -4, // Eastern
|
|
12
|
+
'America/Chicago': -6, 'America/Chicago_DST': -5, // Central
|
|
13
|
+
'America/Denver': -7, 'America/Denver_DST': -6, // Mountain
|
|
14
|
+
'America/Phoenix': -7, // Mountain (no DST)
|
|
15
|
+
'America/Los_Angeles': -8, 'America/Los_Angeles_DST': -7, // Pacific
|
|
16
|
+
'America/Anchorage': -9, 'America/Anchorage_DST': -8, // Alaska
|
|
17
|
+
'Pacific/Honolulu': -10, // Hawaii (no DST)
|
|
18
|
+
// South America:
|
|
19
|
+
'America/Sao_Paulo': -3, // Brazil (DST mostly abolished)
|
|
20
|
+
'America/Buenos_Aires': -3, // Argentina
|
|
21
|
+
// Europe:
|
|
22
|
+
'Europe/London': 0, 'Europe/London_DST': 1, // UK
|
|
23
|
+
'Europe/Berlin': 1, 'Europe/Berlin_DST': 2, // Central Europe
|
|
24
|
+
'Europe/Moscow': 3, // Russia (no DST)
|
|
25
|
+
// Asia:
|
|
26
|
+
'Asia/Dubai': 4, // UAE
|
|
27
|
+
'Asia/Kolkata': 5.5, // India
|
|
28
|
+
'Asia/Shanghai': 8, // China
|
|
29
|
+
'Asia/Tokyo': 9, // Japan
|
|
30
|
+
'Asia/Singapore': 8,
|
|
31
|
+
// Australia:
|
|
32
|
+
'Australia/Sydney': 10, 'Australia/Sydney_DST': 11,
|
|
33
|
+
'Australia/Perth': 8,
|
|
34
|
+
// Africa:
|
|
35
|
+
'Africa/Johannesburg': 2,
|
|
36
|
+
'Africa/Lagos': 1
|
|
37
|
+
};
|
|
9
38
|
function getCosmosTimeZoneHourDiff(timeZone) {
|
|
10
39
|
let diff = 0;
|
|
11
40
|
if (!!timeZone) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
diff = dst ? -5 : -6;
|
|
19
|
-
break;
|
|
20
|
-
case 'America/Denver':
|
|
21
|
-
diff = dst ? -6 : -7;
|
|
22
|
-
break;
|
|
23
|
-
case 'America/Phoenix':
|
|
24
|
-
diff = -7;
|
|
25
|
-
break;
|
|
26
|
-
case 'America/Los_Angeles':
|
|
27
|
-
diff = dst ? -7 : -8;
|
|
28
|
-
break;
|
|
29
|
-
default:
|
|
30
|
-
break;
|
|
41
|
+
let lookupTimeZone = timeZone;
|
|
42
|
+
if (isDaylightSavingTime(timeZone)) {
|
|
43
|
+
lookupTimeZone += '_DST';
|
|
44
|
+
}
|
|
45
|
+
if (lookupTimeZone in TIME_ZONE_OFFSETS) {
|
|
46
|
+
diff = TIME_ZONE_OFFSETS[lookupTimeZone];
|
|
31
47
|
}
|
|
32
48
|
}
|
|
33
49
|
return diff;
|
|
@@ -24,9 +24,6 @@ export interface ChatWMSProduct extends ChatWMSProductBase {
|
|
|
24
24
|
columnDescriptions: ChatWMSProductColumnDescription[];
|
|
25
25
|
columnComments: ChatWMSProductColumnComment[];
|
|
26
26
|
valueDescriptionQueries: ChatWMSProductValueDescriptionQuery[];
|
|
27
|
-
tableMappings: ChatWMSProductTableMapping[];
|
|
28
|
-
columnMappings: ChatWMSProductColumnMapping[];
|
|
29
|
-
analysis: any[];
|
|
30
27
|
}
|
|
31
28
|
export declare function initChatWMSProduct(): ChatWMSProduct;
|
|
32
29
|
export interface ChatWMSProductVariable {
|
|
@@ -67,12 +64,3 @@ export interface ChatWMSProductValueDescriptionQuery {
|
|
|
67
64
|
tableName?: string;
|
|
68
65
|
query: string;
|
|
69
66
|
}
|
|
70
|
-
export interface ChatWMSProductTableMapping {
|
|
71
|
-
dstTableName: string;
|
|
72
|
-
srcTableName: string;
|
|
73
|
-
}
|
|
74
|
-
export interface ChatWMSProductColumnMapping {
|
|
75
|
-
dstTableName: string;
|
|
76
|
-
dstColumnName: string;
|
|
77
|
-
srcColumnName: string;
|
|
78
|
-
}
|
package/dist/chatwms/product.js
CHANGED
|
@@ -36,10 +36,7 @@ export function initChatWMSProduct() {
|
|
|
36
36
|
examples: [],
|
|
37
37
|
columnDescriptions: [],
|
|
38
38
|
columnComments: [],
|
|
39
|
-
valueDescriptionQueries: []
|
|
40
|
-
tableMappings: [],
|
|
41
|
-
columnMappings: [],
|
|
42
|
-
analysis: []
|
|
39
|
+
valueDescriptionQueries: []
|
|
43
40
|
};
|
|
44
41
|
}
|
|
45
42
|
export function chatwmsGetStandardProductVariables(vendor) {
|