@mcurros2/microm 1.1.140-0 → 1.1.141-0
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/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1485,9 +1485,10 @@ var $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet = undefined && undefined.__clas
|
|
|
1485
1485
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1486
1486
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
1487
1487
|
};
|
|
1488
|
-
var $a1f6b3ef69eb7cc7$var$_MicroMClient_instances, $a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN_STORAGE, $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID, $a1f6b3ef69eb7cc7$var$_MicroMClient_LOGIN_TIMEOUT, $a1f6b3ef69eb7cc7$var$_MicroMClient_REQUEST_MODE, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN, $a1f6b3ef69eb7cc7$var$_MicroMClient_tokenRefreshInProgress, $a1f6b3ef69eb7cc7$var$_MicroMClient_publicEndpoints, $a1f6b3ef69eb7cc7$var$_MicroMClient_DATA_STORAGE, $a1f6b3ef69eb7cc7$var$_MicroMClient_ENABLED_MENUS, $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORD_PATHS, $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORDED_PATHS, $a1f6b3ef69eb7cc7$var$_MicroMClient_REDIRECT_ON_401, $a1f6b3ef69eb7cc7$var$_MicroMClient_recordAccess, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveAllRecordedAccess, $a1f6b3ef69eb7cc7$var$_MicroMClient_getAPIEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_uploadFile, $a1f6b3ef69eb7cc7$var$_MicroMClient_refreshToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveRecordedAccessData, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_readEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_deleteEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_loadToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_setToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_removeToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_checkAndRefreshToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_submitToAPI, $a1f6b3ef69eb7cc7$var$_MicroMClient_submitToPublicAPI, $a1f6b3ef69eb7cc7$var$_MicroMClient_isPublicAPI;
|
|
1488
|
+
var $a1f6b3ef69eb7cc7$var$_MicroMClient_instances, $a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN_STORAGE, $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID, $a1f6b3ef69eb7cc7$var$_MicroMClient_LOGIN_TIMEOUT, $a1f6b3ef69eb7cc7$var$_MicroMClient_REQUEST_MODE, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN, $a1f6b3ef69eb7cc7$var$_MicroMClient_tokenRefreshInProgress, $a1f6b3ef69eb7cc7$var$_MicroMClient_publicEndpoints, $a1f6b3ef69eb7cc7$var$_MicroMClient_DATA_STORAGE, $a1f6b3ef69eb7cc7$var$_MicroMClient_ENABLED_MENUS, $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORD_PATHS, $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORDED_PATHS, $a1f6b3ef69eb7cc7$var$_MicroMClient_REDIRECT_ON_401, $a1f6b3ef69eb7cc7$var$_MicroMClient_TIMEZONE_OFFSET, $a1f6b3ef69eb7cc7$var$_MicroMClient_recordAccess, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveAllRecordedAccess, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveTimeZoneOffset, $a1f6b3ef69eb7cc7$var$_MicroMClient_readTimeZoneOffset, $a1f6b3ef69eb7cc7$var$_MicroMClient_getTimeZoneOffset, $a1f6b3ef69eb7cc7$var$_MicroMClient_getAPIEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_uploadFile, $a1f6b3ef69eb7cc7$var$_MicroMClient_refreshToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveRecordedAccessData, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_readEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_deleteEnabledMenus, $a1f6b3ef69eb7cc7$var$_MicroMClient_loadToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_setToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_removeToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_checkAndRefreshToken, $a1f6b3ef69eb7cc7$var$_MicroMClient_submitToAPI, $a1f6b3ef69eb7cc7$var$_MicroMClient_submitToPublicAPI, $a1f6b3ef69eb7cc7$var$_MicroMClient_isPublicAPI;
|
|
1489
1489
|
const $a1f6b3ef69eb7cc7$var$ENABLED_MENUS_DATA_KEY = "mm_menus";
|
|
1490
1490
|
const $a1f6b3ef69eb7cc7$var$REMEMBER_USER_DATA_KEY = "mm_remember_me";
|
|
1491
|
+
const $a1f6b3ef69eb7cc7$var$TIMEZONE_OFFSET_DATA_KEY = "mm_server_timezone_offset";
|
|
1491
1492
|
class $a1f6b3ef69eb7cc7$export$6118e57c65bf19ee {
|
|
1492
1493
|
constructor({ api_url: api_url, app_id: app_id, login_timeout: login_timeout, mode: mode, tokenStorage: tokenStorage, publicEndpoints: publicEndpoints, dataStorage: dataStorage, redirect_on_401: redirect_on_401 }){
|
|
1493
1494
|
$a1f6b3ef69eb7cc7$var$_MicroMClient_instances.add(this);
|
|
@@ -1504,6 +1505,7 @@ class $a1f6b3ef69eb7cc7$export$6118e57c65bf19ee {
|
|
|
1504
1505
|
$a1f6b3ef69eb7cc7$var$_MicroMClient_RECORD_PATHS.set(this, false);
|
|
1505
1506
|
$a1f6b3ef69eb7cc7$var$_MicroMClient_RECORDED_PATHS.set(this, {});
|
|
1506
1507
|
$a1f6b3ef69eb7cc7$var$_MicroMClient_REDIRECT_ON_401.set(this, void 0);
|
|
1508
|
+
$a1f6b3ef69eb7cc7$var$_MicroMClient_TIMEZONE_OFFSET.set(this, 0);
|
|
1507
1509
|
$a1f6b3ef69eb7cc7$var$__classPrivateFieldSet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL, api_url !== null && api_url !== void 0 ? api_url : "", "f");
|
|
1508
1510
|
$a1f6b3ef69eb7cc7$var$__classPrivateFieldSet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID, app_id !== null && app_id !== void 0 ? app_id : "", "f");
|
|
1509
1511
|
$a1f6b3ef69eb7cc7$var$__classPrivateFieldSet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN_STORAGE, tokenStorage !== null && tokenStorage !== void 0 ? tokenStorage : new (0, $2VTPU.TokenWebStorage)("localStorage"), "f");
|
|
@@ -1644,6 +1646,11 @@ class $a1f6b3ef69eb7cc7$export$6118e57c65bf19ee {
|
|
|
1644
1646
|
} catch (error) {
|
|
1645
1647
|
console.warn("Error getting enabled menus", error);
|
|
1646
1648
|
}
|
|
1649
|
+
try {
|
|
1650
|
+
yield $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_instances, "m", $a1f6b3ef69eb7cc7$var$_MicroMClient_getTimeZoneOffset).call(this);
|
|
1651
|
+
} catch (error) {
|
|
1652
|
+
console.warn("Error getting server timezone offset", error);
|
|
1653
|
+
}
|
|
1647
1654
|
return token;
|
|
1648
1655
|
} else throw {
|
|
1649
1656
|
statusMessage: "Unexpected result",
|
|
@@ -1715,6 +1722,9 @@ class $a1f6b3ef69eb7cc7$export$6118e57c65bf19ee {
|
|
|
1715
1722
|
}
|
|
1716
1723
|
});
|
|
1717
1724
|
}
|
|
1725
|
+
get TIMEZONE_OFFSET() {
|
|
1726
|
+
return $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_TIMEZONE_OFFSET, "f");
|
|
1727
|
+
}
|
|
1718
1728
|
getMenus() {
|
|
1719
1729
|
return $a1f6b3ef69eb7cc7$var$__awaiter(this, void 0, void 0, function*() {
|
|
1720
1730
|
if ($a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_ENABLED_MENUS, "f").size === 0) {
|
|
@@ -1887,7 +1897,7 @@ class $a1f6b3ef69eb7cc7$export$6118e57c65bf19ee {
|
|
|
1887
1897
|
return fileGuid ? `${$a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL, "f")}/${$a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID, "f")}/thumbnail/${fileGuid}/${max_size}/${quality}` : "";
|
|
1888
1898
|
}
|
|
1889
1899
|
}
|
|
1890
|
-
$a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN_STORAGE = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_LOGIN_TIMEOUT = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_REQUEST_MODE = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_tokenRefreshInProgress = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_publicEndpoints = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_DATA_STORAGE = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_ENABLED_MENUS = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORD_PATHS = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORDED_PATHS = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_REDIRECT_ON_401 = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_instances = new WeakSet(), $a1f6b3ef69eb7cc7$var$_MicroMClient_recordAccess = function _MicroMClient_recordAccess({ entityName: entityName, access: access, views: views, procs: procs, actions: actions, lookups: lookups }) {
|
|
1900
|
+
$a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN_STORAGE = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_LOGIN_TIMEOUT = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_REQUEST_MODE = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_tokenRefreshInProgress = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_publicEndpoints = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_DATA_STORAGE = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_ENABLED_MENUS = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORD_PATHS = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORDED_PATHS = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_REDIRECT_ON_401 = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_TIMEZONE_OFFSET = new WeakMap(), $a1f6b3ef69eb7cc7$var$_MicroMClient_instances = new WeakSet(), $a1f6b3ef69eb7cc7$var$_MicroMClient_recordAccess = function _MicroMClient_recordAccess({ entityName: entityName, access: access, views: views, procs: procs, actions: actions, lookups: lookups }) {
|
|
1891
1901
|
if ($a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORD_PATHS, "f")) {
|
|
1892
1902
|
const rec = $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_RECORDED_PATHS, "f")[entityName];
|
|
1893
1903
|
if (rec) {
|
|
@@ -1932,6 +1942,32 @@ $a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL = new WeakMap(), $a1f6b3ef69eb7cc7$v
|
|
|
1932
1942
|
console.log(result);
|
|
1933
1943
|
}
|
|
1934
1944
|
});
|
|
1945
|
+
}, $a1f6b3ef69eb7cc7$var$_MicroMClient_saveTimeZoneOffset = function _MicroMClient_saveTimeZoneOffset(data) {
|
|
1946
|
+
return $a1f6b3ef69eb7cc7$var$__awaiter(this, void 0, void 0, function*() {
|
|
1947
|
+
yield $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_DATA_STORAGE, "f").saveData($a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID, "f"), $a1f6b3ef69eb7cc7$var$TIMEZONE_OFFSET_DATA_KEY, data);
|
|
1948
|
+
});
|
|
1949
|
+
}, $a1f6b3ef69eb7cc7$var$_MicroMClient_readTimeZoneOffset = function _MicroMClient_readTimeZoneOffset() {
|
|
1950
|
+
return $a1f6b3ef69eb7cc7$var$__awaiter(this, void 0, void 0, function*() {
|
|
1951
|
+
const result = yield $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_DATA_STORAGE, "f").readData($a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_APP_ID, "f"), $a1f6b3ef69eb7cc7$var$TIMEZONE_OFFSET_DATA_KEY);
|
|
1952
|
+
if (result === null) {
|
|
1953
|
+
console.warn("No timezone offset found, using default 0");
|
|
1954
|
+
$a1f6b3ef69eb7cc7$var$__classPrivateFieldSet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_TIMEZONE_OFFSET, 0, "f");
|
|
1955
|
+
return 0;
|
|
1956
|
+
}
|
|
1957
|
+
$a1f6b3ef69eb7cc7$var$__classPrivateFieldSet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_TIMEZONE_OFFSET, result, "f");
|
|
1958
|
+
return result;
|
|
1959
|
+
});
|
|
1960
|
+
}, $a1f6b3ef69eb7cc7$var$_MicroMClient_getTimeZoneOffset = function _MicroMClient_getTimeZoneOffset() {
|
|
1961
|
+
return $a1f6b3ef69eb7cc7$var$__awaiter(this, arguments, void 0, function*(abort_signal = null) {
|
|
1962
|
+
if (!$a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN, "f")) return;
|
|
1963
|
+
const result = yield $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_instances, "m", $a1f6b3ef69eb7cc7$var$_MicroMClient_submitToAPI).call(this, "SystemProcs", null, null, [], "proc", abort_signal, "sys_GetTimeZoneOffset");
|
|
1964
|
+
if (isNaN(result)) {
|
|
1965
|
+
console.warn("No timezone offset found, using default 0");
|
|
1966
|
+
return 0;
|
|
1967
|
+
}
|
|
1968
|
+
yield $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_instances, "m", $a1f6b3ef69eb7cc7$var$_MicroMClient_saveTimeZoneOffset).call(this, result);
|
|
1969
|
+
return result;
|
|
1970
|
+
});
|
|
1935
1971
|
}, $a1f6b3ef69eb7cc7$var$_MicroMClient_getAPIEnabledMenus = function _MicroMClient_getAPIEnabledMenus(username_1) {
|
|
1936
1972
|
return $a1f6b3ef69eb7cc7$var$__awaiter(this, arguments, void 0, function*(username, abort_signal = null) {
|
|
1937
1973
|
if (!$a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN, "f")) return;
|
|
@@ -2097,6 +2133,7 @@ $a1f6b3ef69eb7cc7$var$_MicroMClient_API_URL = new WeakMap(), $a1f6b3ef69eb7cc7$v
|
|
|
2097
2133
|
}, $a1f6b3ef69eb7cc7$var$_MicroMClient_checkAndRefreshToken = function _MicroMClient_checkAndRefreshToken() {
|
|
2098
2134
|
return $a1f6b3ef69eb7cc7$var$__awaiter(this, void 0, void 0, function*() {
|
|
2099
2135
|
yield $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_instances, "m", $a1f6b3ef69eb7cc7$var$_MicroMClient_loadToken).call(this);
|
|
2136
|
+
yield $a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_instances, "m", $a1f6b3ef69eb7cc7$var$_MicroMClient_readTimeZoneOffset).call(this);
|
|
2100
2137
|
if (!$a1f6b3ef69eb7cc7$var$__classPrivateFieldGet(this, $a1f6b3ef69eb7cc7$var$_MicroMClient_TOKEN, "f")) return;
|
|
2101
2138
|
const renewalAheadPeriod = 60000;
|
|
2102
2139
|
const now = new Date();
|
|
@@ -6309,14 +6346,15 @@ function $571203341efec15f$export$3203edd9e5edd663(value, locale, dateOptions) {
|
|
|
6309
6346
|
function $571203341efec15f$export$f5dd818bff069720(value, locale) {
|
|
6310
6347
|
return new Intl.NumberFormat(locale).format(Number(value));
|
|
6311
6348
|
}
|
|
6312
|
-
function $571203341efec15f$export$5dd6539d90141996(value) {
|
|
6349
|
+
function $571203341efec15f$export$5dd6539d90141996(value, serverTimeZoneOffset) {
|
|
6313
6350
|
// If the value already includes an explicit timezone indicator, parse as is.
|
|
6314
6351
|
if (value.endsWith("Z") || value.includes("GMT") || value.includes("GMT+") || value.includes("GMT-")) return new Date(value);
|
|
6315
|
-
|
|
6316
|
-
//
|
|
6317
|
-
const
|
|
6318
|
-
const
|
|
6319
|
-
|
|
6352
|
+
if (serverTimeZoneOffset === undefined) serverTimeZoneOffset = 0;
|
|
6353
|
+
// Otherwise, add server timezone offset to the date string.
|
|
6354
|
+
const date = new Date(value);
|
|
6355
|
+
const localTimeZoneOffset = date.getTimezoneOffset() * 60000; // Convert minutes to milliseconds
|
|
6356
|
+
const adjustedTime = date.getTime() + localTimeZoneOffset + serverTimeZoneOffset * 3600000; // Convert hours to milliseconds
|
|
6357
|
+
return new Date(adjustedTime);
|
|
6320
6358
|
}
|
|
6321
6359
|
function $571203341efec15f$export$62c5cbf81b90da20(value, sqlType, locale) {
|
|
6322
6360
|
if (value === null) return "null";
|
|
@@ -6378,7 +6416,7 @@ function $571203341efec15f$export$62c5cbf81b90da20(value, sqlType, locale) {
|
|
|
6378
6416
|
return String(value);
|
|
6379
6417
|
}
|
|
6380
6418
|
}
|
|
6381
|
-
function $571203341efec15f$export$e41af95719431a64(value, sqlType) {
|
|
6419
|
+
function $571203341efec15f$export$e41af95719431a64(value, sqlType, serverTimezoneOffset) {
|
|
6382
6420
|
if (typeof value !== "string") return value;
|
|
6383
6421
|
switch(sqlType){
|
|
6384
6422
|
case "char":
|
|
@@ -6404,7 +6442,7 @@ function $571203341efec15f$export$e41af95719431a64(value, sqlType) {
|
|
|
6404
6442
|
case "datetime":
|
|
6405
6443
|
case "smalldatetime":
|
|
6406
6444
|
case "date":
|
|
6407
|
-
return $571203341efec15f$export$5dd6539d90141996(value);
|
|
6445
|
+
return $571203341efec15f$export$5dd6539d90141996(value, serverTimezoneOffset);
|
|
6408
6446
|
default:
|
|
6409
6447
|
return value;
|
|
6410
6448
|
}
|
|
@@ -6424,25 +6462,28 @@ const $74f29643e1a74520$export$da03655abff5c59b = {
|
|
|
6424
6462
|
initialLocale: navigator.language
|
|
6425
6463
|
};
|
|
6426
6464
|
function $74f29643e1a74520$export$6f2f7bc6c278ece1(props) {
|
|
6427
|
-
const { initialLocale: initialLocale } = (0, $b4te3$mantinecore.useComponentDefaultProps)("useLocaleFormat", $74f29643e1a74520$export$da03655abff5c59b, props);
|
|
6465
|
+
const { initialLocale: initialLocale, timeZoneOffset: timeZoneOffset } = (0, $b4te3$mantinecore.useComponentDefaultProps)("useLocaleFormat", $74f29643e1a74520$export$da03655abff5c59b, props);
|
|
6428
6466
|
const [locale, setLocale] = (0, $b4te3$react.useState)(initialLocale);
|
|
6429
6467
|
const formatValue = (0, $b4te3$react.useCallback)(function(value, sqlType) {
|
|
6430
6468
|
const result = (0, $7ttm6.formatSQLValue)(value, sqlType, locale);
|
|
6431
6469
|
return result;
|
|
6432
6470
|
}, [
|
|
6433
|
-
locale
|
|
6471
|
+
locale,
|
|
6472
|
+
timeZoneOffset
|
|
6434
6473
|
]);
|
|
6435
6474
|
const getNativeValue = (0, $b4te3$react.useCallback)(function(value, sqlType) {
|
|
6436
|
-
const result = (0, $7ttm6.convertToNativeValue)(value, sqlType);
|
|
6475
|
+
const result = (0, $7ttm6.convertToNativeValue)(value, sqlType, timeZoneOffset);
|
|
6437
6476
|
return result;
|
|
6438
6477
|
}, [
|
|
6439
|
-
locale
|
|
6478
|
+
locale,
|
|
6479
|
+
timeZoneOffset
|
|
6440
6480
|
]); // locale is here so the values captured here are in sync with formatValue
|
|
6441
6481
|
const formatColumnValue = (0, $b4te3$react.useCallback)((col)=>{
|
|
6442
6482
|
const result = (0, $7ttm6.formatSQLValue)(col.value, col.type, locale);
|
|
6443
6483
|
return result === "null" ? "" : result;
|
|
6444
6484
|
}, [
|
|
6445
|
-
locale
|
|
6485
|
+
locale,
|
|
6486
|
+
timeZoneOffset
|
|
6446
6487
|
]);
|
|
6447
6488
|
return {
|
|
6448
6489
|
locale: locale,
|
|
@@ -8632,7 +8673,8 @@ function $eca5c8f2655679a5$export$c8dd51eb24f71762(props) {
|
|
|
8632
8673
|
autoSizeColumnsOnLoad: autoSizeColumnsOnLoad,
|
|
8633
8674
|
rowBorders: rowBorders,
|
|
8634
8675
|
withBorder: withBorder,
|
|
8635
|
-
columnsOverrides: effectiveColumnOverrides
|
|
8676
|
+
columnsOverrides: effectiveColumnOverrides,
|
|
8677
|
+
timeZoneOffset: entity === null || entity === void 0 ? void 0 : entity.API.client.TIMEZONE_OFFSET
|
|
8636
8678
|
})
|
|
8637
8679
|
]
|
|
8638
8680
|
}),
|
|
@@ -8815,7 +8857,7 @@ var $ca05733d35d65bda$var$__awaiter = undefined && undefined.__awaiter || functi
|
|
|
8815
8857
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8816
8858
|
});
|
|
8817
8859
|
};
|
|
8818
|
-
function $ca05733d35d65bda$export$f6b86a04e5d66d90({ columns: columns, rows: rows, selectionMode: selectionMode, onDoubleClick: onDoubleClick, preserveSelection: preserveSelection, onSelectionChanged: onSelectionChanged, showSelectCheckbox: showSelectCheckbox, rowHeight: rowHeight, stripped: stripped, highlightOnHover: highlightOnHover, columnBorders: columnBorders, rowBorders: rowBorders, withBorder: withBorder, autoSizeColumnsOnLoad: autoSizeColumnsOnLoad, autoSelectFirstRow: autoSelectFirstRow, columnsOverrides: columnsOverrides, selectedRows: selectedRows, setSelectedRows: setSelectedRows }) {
|
|
8860
|
+
function $ca05733d35d65bda$export$f6b86a04e5d66d90({ columns: columns, rows: rows, selectionMode: selectionMode, onDoubleClick: onDoubleClick, preserveSelection: preserveSelection, onSelectionChanged: onSelectionChanged, showSelectCheckbox: showSelectCheckbox, rowHeight: rowHeight, stripped: stripped, highlightOnHover: highlightOnHover, columnBorders: columnBorders, rowBorders: rowBorders, withBorder: withBorder, autoSizeColumnsOnLoad: autoSizeColumnsOnLoad, autoSelectFirstRow: autoSelectFirstRow, columnsOverrides: columnsOverrides, selectedRows: selectedRows, setSelectedRows: setSelectedRows, timeZoneOffset: timeZoneOffset }) {
|
|
8819
8861
|
const gridRef = (0, $b4te3$react.useRef)(undefined);
|
|
8820
8862
|
const boxRef = (0, $b4te3$react.useRef)(null); //TODO: support different elements
|
|
8821
8863
|
const gridName = (0, $b4te3$react.useId)().replace(/:/g, "_"); //fix conflict with ":" in CSS
|
|
@@ -8829,7 +8871,8 @@ function $ca05733d35d65bda$export$f6b86a04e5d66d90({ columns: columns, rows: row
|
|
|
8829
8871
|
columnAutoResizeSource: columnAutoResizeSource,
|
|
8830
8872
|
gridRef: gridRef,
|
|
8831
8873
|
autoSizeColumnsOnLoad: autoSizeColumnsOnLoad,
|
|
8832
|
-
boxRef: boxRef
|
|
8874
|
+
boxRef: boxRef,
|
|
8875
|
+
timeZoneOffset: timeZoneOffset
|
|
8833
8876
|
});
|
|
8834
8877
|
//if (isFirstVisible) console.log('grid is visible');
|
|
8835
8878
|
(0, $b4te3$react.useEffect)(()=>{
|
|
@@ -32569,9 +32612,11 @@ function $7a59e94d4829360b$var$escapeHTML(text) {
|
|
|
32569
32612
|
const $7a59e94d4829360b$var$emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
32570
32613
|
const $7a59e94d4829360b$var$emptyCellsPortals = {}; //optimization, avoids unnecessary rerenders on multiple portal state cleanups
|
|
32571
32614
|
function $7a59e94d4829360b$export$98063caad9d01a0(props) {
|
|
32572
|
-
const { columns: columns, rows: rows, columnsOverrides: columnsOverrides, columnAutoResizeSource: columnAutoResizeSource, gridRef: gridRef, autoSizeColumnsOnLoad: autoSizeColumnsOnLoad, boxRef: boxRef } = props;
|
|
32615
|
+
const { columns: columns, rows: rows, columnsOverrides: columnsOverrides, columnAutoResizeSource: columnAutoResizeSource, gridRef: gridRef, autoSizeColumnsOnLoad: autoSizeColumnsOnLoad, boxRef: boxRef, timeZoneOffset: timeZoneOffset } = props;
|
|
32573
32616
|
const isFirstVisible = (0, $i27OQ.useFirstVisible)(boxRef);
|
|
32574
|
-
const emptyLocaleProps = (0, $b4te3$react.useRef)({
|
|
32617
|
+
const emptyLocaleProps = (0, $b4te3$react.useRef)({
|
|
32618
|
+
timeZoneOffset: timeZoneOffset || 0
|
|
32619
|
+
});
|
|
32575
32620
|
const localeFormat = (0, $a2vzY.useLocaleFormat)(emptyLocaleProps.current);
|
|
32576
32621
|
const [cellsPortals, setCellsPortals] = (0, $b4te3$react.useState)($7a59e94d4829360b$var$emptyCellsPortals);
|
|
32577
32622
|
const renderedCellsCountRef = (0, $b4te3$react.useRef)(0);
|
|
@@ -35214,7 +35259,9 @@ var $42GxC = parcelRequire("42GxC");
|
|
|
35214
35259
|
const $addacdedf65beec7$export$528929806c03169f = (props)=>{
|
|
35215
35260
|
const { parentKeys: parentKeys, selectDataState: selectDataState, triggerRefreshState: triggerRefreshState, column: column, entityForm: entityForm, entity: entity, lookupDefName: lookupDefName, maxItems: maxItems, includeKeyInDescription: includeKeyInDescription } = props;
|
|
35216
35261
|
const [triggerRefresh, setTriggerRefresh] = triggerRefreshState;
|
|
35217
|
-
const localeFormat = (0, $a2vzY.useLocaleFormat)({
|
|
35262
|
+
const localeFormat = (0, $a2vzY.useLocaleFormat)({
|
|
35263
|
+
timeZoneOffset: entity.API.client.TIMEZONE_OFFSET
|
|
35264
|
+
});
|
|
35218
35265
|
const { lookupEntity: lookupEntity, lookupDef: lookupDef, lookupViewName: lookupViewName } = (0, $iuZkb.useLookupEntity)({
|
|
35219
35266
|
entity: entity,
|
|
35220
35267
|
lookupDefName: lookupDefName,
|
|
@@ -36331,7 +36378,9 @@ var $40c00e2ecacb5ae0$var$__awaiter = undefined && undefined.__awaiter || functi
|
|
|
36331
36378
|
};
|
|
36332
36379
|
function $40c00e2ecacb5ae0$export$2d2c672e82add59e(props, stateProps) {
|
|
36333
36380
|
const { entity: entity, parentKeys: parentKeys, viewName: viewName, limit: limit, onSelectionChanged: onSelectionChanged, modalFormSize: modalFormSize, onModalSaved: onModalSaved, labels: labels, saveFormBeforeAdd: saveFormBeforeAdd, parentFormAPI: parentFormAPI, allwaysRefreshOnEntityClose: allwaysRefreshOnEntityClose, notExportableColumns: notExportableColumns, itemsPerPage: itemsPerPage, onActionExecuted: onActionExecuted, convertResultToLocaleString: convertResultToLocaleString, withModalFullscreenButton: withModalFullscreenButton, onDataRefresh: onDataRefresh } = props;
|
|
36334
|
-
const localeFormat = (0, $a2vzY.useLocaleFormat)({
|
|
36381
|
+
const localeFormat = (0, $a2vzY.useLocaleFormat)({
|
|
36382
|
+
timeZoneOffset: (entity === null || entity === void 0 ? void 0 : entity.API.client.TIMEZONE_OFFSET) || 0
|
|
36383
|
+
});
|
|
36335
36384
|
const { setRefresh: setRefresh, setSearchText: setSearchText, executeViewState: executeViewState } = stateProps;
|
|
36336
36385
|
const selectedRecords = (0, $b4te3$react.useRef)([]);
|
|
36337
36386
|
const [selectedRowsCount, setSelectedRowsCount] = (0, $b4te3$react.useState)(0);
|
|
@@ -40604,7 +40653,8 @@ function $98341724af34a02e$export$c945886e1972f43d(props) {
|
|
|
40604
40653
|
withBorder: withBorder,
|
|
40605
40654
|
columnsOverrides: columnsOverrides,
|
|
40606
40655
|
selectedRows: selectedRows,
|
|
40607
|
-
setSelectedRows: setSelectedRows
|
|
40656
|
+
setSelectedRows: setSelectedRows,
|
|
40657
|
+
timeZoneOffset: entity === null || entity === void 0 ? void 0 : entity.API.client.TIMEZONE_OFFSET
|
|
40608
40658
|
})
|
|
40609
40659
|
]
|
|
40610
40660
|
}),
|
|
@@ -46796,7 +46846,9 @@ function $710f5c670057cb9d$export$1df7c3fdc0006409(props) {
|
|
|
46796
46846
|
"description"
|
|
46797
46847
|
]);
|
|
46798
46848
|
const theme = (0, $b4te3$mantinecore.useMantineTheme)();
|
|
46799
|
-
const localeFormat = (0, $a2vzY.useLocaleFormat)({
|
|
46849
|
+
const localeFormat = (0, $a2vzY.useLocaleFormat)({
|
|
46850
|
+
timeZoneOffset: entityForm.entity.API.client.TIMEZONE_OFFSET
|
|
46851
|
+
});
|
|
46800
46852
|
(0, $hAMyt.useFieldConfiguration)({
|
|
46801
46853
|
entityForm: entityForm,
|
|
46802
46854
|
column: weekStartDateColumn,
|