@arex95/vue-core 1.0.8 → 1.1.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/composables/auth/useAuth.d.ts +15 -18
- package/dist/composables/monitoring/useApiActivity.d.ts +5 -0
- package/dist/composables/monitoring/useUserActivity.d.ts +15 -0
- package/dist/config/axios/axiosInstance.d.ts +1 -1
- package/dist/config/global/endpointsConfig.d.ts +14 -17
- package/dist/config/global/sessionConfig.d.ts +27 -0
- package/dist/config/global/tokenConfig.d.ts +27 -11
- package/dist/enums/breakpointsEnums.d.ts +29 -0
- package/dist/enums/contentTypesEnums.d.ts +56 -0
- package/dist/enums/errorsEnums.d.ts +68 -0
- package/dist/enums/fileTypesEnums.d.ts +61 -0
- package/dist/enums/httpExceptionsEnums.d.ts +71 -0
- package/dist/enums/index.d.ts +7 -0
- package/dist/enums/keyCodesEnums.d.ts +62 -0
- package/dist/enums/storageEnums.d.ts +66 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +480 -190
- package/dist/rest/RestStd.d.ts +1 -1
- package/dist/types/AuthConfig.d.ts +5 -0
- package/dist/types/EndpointsConfig.d.ts +5 -0
- package/dist/types/SessionConfig.d.ts +3 -0
- package/dist/types/TokenConfig.d.ts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +13 -6
package/dist/index.mjs
CHANGED
|
@@ -1667,214 +1667,481 @@ function isValidHexNumber(hex) {
|
|
|
1667
1667
|
// console.log(isValidHexNumber('GHIJ')); // false
|
|
1668
1668
|
|
|
1669
1669
|
/**
|
|
1670
|
-
*
|
|
1671
|
-
|
|
1670
|
+
* Enum defining available screen sizes.
|
|
1671
|
+
*/
|
|
1672
|
+
var ScreenSize;
|
|
1673
|
+
(function (ScreenSize) {
|
|
1674
|
+
ScreenSize["XS"] = "XS";
|
|
1675
|
+
ScreenSize["SM"] = "SM";
|
|
1676
|
+
ScreenSize["MD"] = "MD";
|
|
1677
|
+
ScreenSize["LG"] = "LG";
|
|
1678
|
+
ScreenSize["XL"] = "XL";
|
|
1679
|
+
ScreenSize["XXL"] = "XXL";
|
|
1680
|
+
})(ScreenSize || (ScreenSize = {}));
|
|
1681
|
+
/**
|
|
1682
|
+
* Enum defining breakpoints for design based on screen width.
|
|
1683
|
+
* Values are in pixels.
|
|
1672
1684
|
*/
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1685
|
+
var ScreenBreakpoint;
|
|
1686
|
+
(function (ScreenBreakpoint) {
|
|
1687
|
+
ScreenBreakpoint[ScreenBreakpoint["XS"] = 480] = "XS";
|
|
1688
|
+
ScreenBreakpoint[ScreenBreakpoint["SM"] = 576] = "SM";
|
|
1689
|
+
ScreenBreakpoint[ScreenBreakpoint["MD"] = 768] = "MD";
|
|
1690
|
+
ScreenBreakpoint[ScreenBreakpoint["LG"] = 992] = "LG";
|
|
1691
|
+
ScreenBreakpoint[ScreenBreakpoint["XL"] = 1200] = "XL";
|
|
1692
|
+
ScreenBreakpoint[ScreenBreakpoint["XXL"] = 1600] = "XXL";
|
|
1693
|
+
})(ScreenBreakpoint || (ScreenBreakpoint = {}));
|
|
1681
1694
|
/**
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1695
|
+
* Map that associates each screen size defined in `ScreenSize` with its corresponding pixel value from `ScreenBreakpoint`.
|
|
1696
|
+
* @type {Map<ScreenSize, number>}
|
|
1697
|
+
*/
|
|
1698
|
+
const screenMap = new Map();
|
|
1699
|
+
screenMap.set(ScreenSize.XS, ScreenBreakpoint.XS);
|
|
1700
|
+
screenMap.set(ScreenSize.SM, ScreenBreakpoint.SM);
|
|
1701
|
+
screenMap.set(ScreenSize.MD, ScreenBreakpoint.MD);
|
|
1702
|
+
screenMap.set(ScreenSize.LG, ScreenBreakpoint.LG);
|
|
1703
|
+
screenMap.set(ScreenSize.XL, ScreenBreakpoint.XL);
|
|
1704
|
+
screenMap.set(ScreenSize.XXL, ScreenBreakpoint.XXL);
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Enum representing all HTTP exception codes.
|
|
1684
1708
|
* @readonly
|
|
1685
1709
|
*/
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1710
|
+
var ExceptionEnum;
|
|
1711
|
+
(function (ExceptionEnum) {
|
|
1712
|
+
// 1xx - Informational
|
|
1713
|
+
ExceptionEnum[ExceptionEnum["CONTINUE"] = 100] = "CONTINUE";
|
|
1714
|
+
ExceptionEnum[ExceptionEnum["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
|
|
1715
|
+
ExceptionEnum[ExceptionEnum["PROCESSING"] = 102] = "PROCESSING";
|
|
1716
|
+
ExceptionEnum[ExceptionEnum["EARLY_HINTS"] = 103] = "EARLY_HINTS";
|
|
1717
|
+
// 2xx - Success
|
|
1718
|
+
ExceptionEnum[ExceptionEnum["OK"] = 200] = "OK";
|
|
1719
|
+
ExceptionEnum[ExceptionEnum["CREATED"] = 201] = "CREATED";
|
|
1720
|
+
ExceptionEnum[ExceptionEnum["ACCEPTED"] = 202] = "ACCEPTED";
|
|
1721
|
+
ExceptionEnum[ExceptionEnum["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
|
|
1722
|
+
ExceptionEnum[ExceptionEnum["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
1723
|
+
ExceptionEnum[ExceptionEnum["RESET_CONTENT"] = 205] = "RESET_CONTENT";
|
|
1724
|
+
ExceptionEnum[ExceptionEnum["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
|
|
1725
|
+
ExceptionEnum[ExceptionEnum["MULTI_STATUS"] = 207] = "MULTI_STATUS";
|
|
1726
|
+
ExceptionEnum[ExceptionEnum["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED";
|
|
1727
|
+
ExceptionEnum[ExceptionEnum["IM_USED"] = 226] = "IM_USED";
|
|
1728
|
+
// 3xx - Redirection
|
|
1729
|
+
ExceptionEnum[ExceptionEnum["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
|
|
1730
|
+
ExceptionEnum[ExceptionEnum["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
|
|
1731
|
+
ExceptionEnum[ExceptionEnum["FOUND"] = 302] = "FOUND";
|
|
1732
|
+
ExceptionEnum[ExceptionEnum["SEE_OTHER"] = 303] = "SEE_OTHER";
|
|
1733
|
+
ExceptionEnum[ExceptionEnum["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
|
|
1734
|
+
ExceptionEnum[ExceptionEnum["USE_PROXY"] = 305] = "USE_PROXY";
|
|
1735
|
+
ExceptionEnum[ExceptionEnum["UNUSED"] = 306] = "UNUSED";
|
|
1736
|
+
ExceptionEnum[ExceptionEnum["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
|
|
1737
|
+
ExceptionEnum[ExceptionEnum["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
|
|
1738
|
+
// 4xx - Client Errors
|
|
1739
|
+
ExceptionEnum[ExceptionEnum["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
1740
|
+
ExceptionEnum[ExceptionEnum["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
1741
|
+
ExceptionEnum[ExceptionEnum["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
|
|
1742
|
+
ExceptionEnum[ExceptionEnum["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
1743
|
+
ExceptionEnum[ExceptionEnum["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
1744
|
+
ExceptionEnum[ExceptionEnum["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
|
|
1745
|
+
ExceptionEnum[ExceptionEnum["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
|
|
1746
|
+
ExceptionEnum[ExceptionEnum["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
|
|
1747
|
+
ExceptionEnum[ExceptionEnum["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
1748
|
+
ExceptionEnum[ExceptionEnum["CONFLICT"] = 409] = "CONFLICT";
|
|
1749
|
+
ExceptionEnum[ExceptionEnum["GONE"] = 410] = "GONE";
|
|
1750
|
+
ExceptionEnum[ExceptionEnum["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
|
|
1751
|
+
ExceptionEnum[ExceptionEnum["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
|
|
1752
|
+
ExceptionEnum[ExceptionEnum["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
|
1753
|
+
ExceptionEnum[ExceptionEnum["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
|
|
1754
|
+
ExceptionEnum[ExceptionEnum["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
|
|
1755
|
+
ExceptionEnum[ExceptionEnum["RANGE_NOT_SATISFIABLE"] = 416] = "RANGE_NOT_SATISFIABLE";
|
|
1756
|
+
ExceptionEnum[ExceptionEnum["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
|
|
1757
|
+
ExceptionEnum[ExceptionEnum["IM_A_TEAPOT"] = 418] = "IM_A_TEAPOT";
|
|
1758
|
+
ExceptionEnum[ExceptionEnum["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
|
|
1759
|
+
ExceptionEnum[ExceptionEnum["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
|
|
1760
|
+
ExceptionEnum[ExceptionEnum["LOCKED"] = 423] = "LOCKED";
|
|
1761
|
+
ExceptionEnum[ExceptionEnum["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
|
|
1762
|
+
ExceptionEnum[ExceptionEnum["TOO_EARLY"] = 425] = "TOO_EARLY";
|
|
1763
|
+
ExceptionEnum[ExceptionEnum["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
|
|
1764
|
+
ExceptionEnum[ExceptionEnum["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
|
|
1765
|
+
ExceptionEnum[ExceptionEnum["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
1766
|
+
ExceptionEnum[ExceptionEnum["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
|
|
1767
|
+
ExceptionEnum[ExceptionEnum["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
|
|
1768
|
+
// 5xx - Server Errors
|
|
1769
|
+
ExceptionEnum[ExceptionEnum["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
1770
|
+
ExceptionEnum[ExceptionEnum["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
|
|
1771
|
+
ExceptionEnum[ExceptionEnum["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
|
|
1772
|
+
ExceptionEnum[ExceptionEnum["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
|
1773
|
+
ExceptionEnum[ExceptionEnum["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
|
|
1774
|
+
ExceptionEnum[ExceptionEnum["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
|
|
1775
|
+
ExceptionEnum[ExceptionEnum["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
|
|
1776
|
+
ExceptionEnum[ExceptionEnum["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
|
|
1777
|
+
ExceptionEnum[ExceptionEnum["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
|
|
1778
|
+
ExceptionEnum[ExceptionEnum["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
|
|
1779
|
+
ExceptionEnum[ExceptionEnum["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
|
|
1780
|
+
// Custom Error Codes
|
|
1781
|
+
ExceptionEnum[ExceptionEnum["NET_WORK_ERROR"] = 10000] = "NET_WORK_ERROR";
|
|
1782
|
+
ExceptionEnum[ExceptionEnum["PAGE_NOT_DATA"] = 10100] = "PAGE_NOT_DATA";
|
|
1783
|
+
})(ExceptionEnum || (ExceptionEnum = {}));
|
|
1784
|
+
|
|
1694
1785
|
/**
|
|
1695
|
-
*
|
|
1696
|
-
* @
|
|
1786
|
+
* Enum representing various MIME types for different file categories.
|
|
1787
|
+
* @readonly
|
|
1697
1788
|
*/
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1789
|
+
var ImageTypes;
|
|
1790
|
+
(function (ImageTypes) {
|
|
1791
|
+
ImageTypes["APNG"] = "image/apng";
|
|
1792
|
+
ImageTypes["BMP"] = "image/bmp";
|
|
1793
|
+
ImageTypes["GIF"] = "image/gif";
|
|
1794
|
+
ImageTypes["JPEG"] = "image/jpeg";
|
|
1795
|
+
ImageTypes["PJPEG"] = "image/pjpeg";
|
|
1796
|
+
ImageTypes["PNG"] = "image/png";
|
|
1797
|
+
ImageTypes["SVG"] = "image/svg+xml";
|
|
1798
|
+
ImageTypes["TIFF"] = "image/tiff";
|
|
1799
|
+
ImageTypes["WEBP"] = "image/webp";
|
|
1800
|
+
ImageTypes["XICON"] = "image/x-icon";
|
|
1801
|
+
})(ImageTypes || (ImageTypes = {}));
|
|
1802
|
+
var AudioTypes;
|
|
1803
|
+
(function (AudioTypes) {
|
|
1804
|
+
AudioTypes["Audios"] = "audio/*";
|
|
1805
|
+
})(AudioTypes || (AudioTypes = {}));
|
|
1806
|
+
var VideoTypes;
|
|
1807
|
+
(function (VideoTypes) {
|
|
1808
|
+
VideoTypes["Videos"] = "video/*";
|
|
1809
|
+
})(VideoTypes || (VideoTypes = {}));
|
|
1810
|
+
var TextTypes;
|
|
1811
|
+
(function (TextTypes) {
|
|
1812
|
+
TextTypes["PlainText"] = "text/plain";
|
|
1813
|
+
TextTypes["HTML"] = "text/html";
|
|
1814
|
+
TextTypes["CSS"] = "text/css";
|
|
1815
|
+
TextTypes["JavaScript"] = "application/javascript";
|
|
1816
|
+
TextTypes["CSV"] = "text/csv";
|
|
1817
|
+
TextTypes["JSON"] = "application/json";
|
|
1818
|
+
TextTypes["XML"] = "application/xml";
|
|
1819
|
+
})(TextTypes || (TextTypes = {}));
|
|
1820
|
+
var DocumentTypes;
|
|
1821
|
+
(function (DocumentTypes) {
|
|
1822
|
+
DocumentTypes["PDF"] = "application/pdf";
|
|
1823
|
+
DocumentTypes["Word"] = "application/msword";
|
|
1824
|
+
DocumentTypes["WordOpenXML"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
1825
|
+
DocumentTypes["Excel"] = "application/vnd.ms-excel";
|
|
1826
|
+
DocumentTypes["ExcelOpenXML"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
1827
|
+
DocumentTypes["PowerPoint"] = "application/vnd.ms-powerpoint";
|
|
1828
|
+
DocumentTypes["PowerPointOpenXML"] = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
1829
|
+
})(DocumentTypes || (DocumentTypes = {}));
|
|
1830
|
+
var ArchiveTypes;
|
|
1831
|
+
(function (ArchiveTypes) {
|
|
1832
|
+
ArchiveTypes["ZIP"] = "application/zip";
|
|
1833
|
+
ArchiveTypes["GZIP"] = "application/gzip";
|
|
1834
|
+
ArchiveTypes["TAR"] = "application/x-tar";
|
|
1835
|
+
ArchiveTypes["RAR"] = "application/x-rar-compressed";
|
|
1836
|
+
})(ArchiveTypes || (ArchiveTypes = {}));
|
|
1837
|
+
var FontTypes;
|
|
1838
|
+
(function (FontTypes) {
|
|
1839
|
+
FontTypes["TrueType"] = "font/ttf";
|
|
1840
|
+
FontTypes["OpenType"] = "font/otf";
|
|
1841
|
+
FontTypes["WebOpenFont"] = "font/woff";
|
|
1842
|
+
FontTypes["WebOpenFont2"] = "font/woff2";
|
|
1843
|
+
})(FontTypes || (FontTypes = {}));
|
|
1844
|
+
var AppTypes;
|
|
1845
|
+
(function (AppTypes) {
|
|
1846
|
+
AppTypes["Executable"] = "application/octet-stream";
|
|
1847
|
+
AppTypes["AndroidAPK"] = "application/vnd.android.package-archive";
|
|
1848
|
+
AppTypes["Java"] = "application/java-archive";
|
|
1849
|
+
})(AppTypes || (AppTypes = {}));
|
|
1850
|
+
var OtherTypes;
|
|
1851
|
+
(function (OtherTypes) {
|
|
1852
|
+
OtherTypes["JSONLD"] = "application/ld+json";
|
|
1853
|
+
OtherTypes["WASM"] = "application/wasm";
|
|
1854
|
+
})(OtherTypes || (OtherTypes = {}));
|
|
1705
1855
|
|
|
1706
1856
|
/**
|
|
1707
|
-
*
|
|
1857
|
+
* Enum representing different content types for HTTP headers.
|
|
1708
1858
|
* @readonly
|
|
1709
1859
|
*/
|
|
1710
|
-
|
|
1860
|
+
var ContentTypeEnum;
|
|
1861
|
+
(function (ContentTypeEnum) {
|
|
1862
|
+
/**
|
|
1863
|
+
* Content type for JSON.
|
|
1864
|
+
* @constant
|
|
1865
|
+
*/
|
|
1866
|
+
ContentTypeEnum["JSON"] = "application/json;charset=UTF-8";
|
|
1711
1867
|
/**
|
|
1712
|
-
*
|
|
1868
|
+
* Content type for URL-encoded form data.
|
|
1869
|
+
* @constant
|
|
1713
1870
|
*/
|
|
1714
|
-
|
|
1871
|
+
ContentTypeEnum["FORM_URLENCODED"] = "application/x-www-form-urlencoded;charset=UTF-8";
|
|
1715
1872
|
/**
|
|
1716
|
-
*
|
|
1873
|
+
* Content type for multipart form data with file uploads.
|
|
1874
|
+
* @constant
|
|
1717
1875
|
*/
|
|
1718
|
-
|
|
1876
|
+
ContentTypeEnum["FORM_DATA"] = "multipart/form-data;charset=UTF-8";
|
|
1719
1877
|
/**
|
|
1720
|
-
*
|
|
1878
|
+
* Content type for plain text.
|
|
1879
|
+
* @constant
|
|
1721
1880
|
*/
|
|
1722
|
-
|
|
1881
|
+
ContentTypeEnum["TEXT_PLAIN"] = "text/plain;charset=UTF-8";
|
|
1723
1882
|
/**
|
|
1724
|
-
*
|
|
1883
|
+
* Content type for XML data.
|
|
1884
|
+
* @constant
|
|
1725
1885
|
*/
|
|
1726
|
-
|
|
1886
|
+
ContentTypeEnum["XML"] = "application/xml;charset=UTF-8";
|
|
1727
1887
|
/**
|
|
1728
|
-
*
|
|
1888
|
+
* Content type for HTML data.
|
|
1889
|
+
* @constant
|
|
1729
1890
|
*/
|
|
1730
|
-
|
|
1891
|
+
ContentTypeEnum["HTML"] = "text/html;charset=UTF-8";
|
|
1731
1892
|
/**
|
|
1732
|
-
*
|
|
1893
|
+
* Content type for JavaScript files.
|
|
1894
|
+
* @constant
|
|
1733
1895
|
*/
|
|
1734
|
-
|
|
1735
|
-
|
|
1896
|
+
ContentTypeEnum["JS"] = "application/javascript;charset=UTF-8";
|
|
1897
|
+
/**
|
|
1898
|
+
* Content type for CSV files.
|
|
1899
|
+
* @constant
|
|
1900
|
+
*/
|
|
1901
|
+
ContentTypeEnum["CSV"] = "text/csv;charset=UTF-8";
|
|
1902
|
+
/**
|
|
1903
|
+
* Content type for PDF files.
|
|
1904
|
+
* @constant
|
|
1905
|
+
*/
|
|
1906
|
+
ContentTypeEnum["PDF"] = "application/pdf";
|
|
1907
|
+
/**
|
|
1908
|
+
* Content type for octet-stream (binary data).
|
|
1909
|
+
* @constant
|
|
1910
|
+
*/
|
|
1911
|
+
ContentTypeEnum["OCTET_STREAM"] = "application/octet-stream";
|
|
1912
|
+
})(ContentTypeEnum || (ContentTypeEnum = {}));
|
|
1736
1913
|
|
|
1737
1914
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
*
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
apng: 'image/apng',
|
|
1743
|
-
bmp: 'image/bmp',
|
|
1744
|
-
gif: 'image/gif',
|
|
1745
|
-
jpeg: 'image/jpeg',
|
|
1746
|
-
pjpeg: 'image/pjpeg',
|
|
1747
|
-
png: 'image/png',
|
|
1748
|
-
svg: 'image/svg+xml',
|
|
1749
|
-
tiff: 'image/tiff',
|
|
1750
|
-
webp: 'image/webp',
|
|
1751
|
-
xicon: 'image/x-icon',
|
|
1752
|
-
};
|
|
1753
|
-
/**
|
|
1754
|
-
* Object defining various file meta types.
|
|
1915
|
+
* Enum for key codes used in keyboard events.
|
|
1916
|
+
* This object holds various key codes commonly used for handling keyboard events.
|
|
1917
|
+
* The keys defined here correspond to specific key codes that can be used to detect
|
|
1918
|
+
* user input in web applications.
|
|
1755
1919
|
* @readonly
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1920
|
+
* @enum {number}
|
|
1921
|
+
*/
|
|
1922
|
+
var KeyCodeEnum;
|
|
1923
|
+
(function (KeyCodeEnum) {
|
|
1924
|
+
/** Arrow Up key */
|
|
1925
|
+
KeyCodeEnum[KeyCodeEnum["UP"] = 38] = "UP";
|
|
1926
|
+
/** Arrow Down key */
|
|
1927
|
+
KeyCodeEnum[KeyCodeEnum["DOWN"] = 40] = "DOWN";
|
|
1928
|
+
/** Enter key */
|
|
1929
|
+
KeyCodeEnum[KeyCodeEnum["ENTER"] = 13] = "ENTER";
|
|
1930
|
+
/** Escape key */
|
|
1931
|
+
KeyCodeEnum[KeyCodeEnum["ESC"] = 27] = "ESC";
|
|
1932
|
+
/** Spacebar key */
|
|
1933
|
+
KeyCodeEnum[KeyCodeEnum["SPACE"] = 32] = "SPACE";
|
|
1934
|
+
/** Tab key */
|
|
1935
|
+
KeyCodeEnum[KeyCodeEnum["TAB"] = 9] = "TAB";
|
|
1936
|
+
/** Backspace key */
|
|
1937
|
+
KeyCodeEnum[KeyCodeEnum["BACKSPACE"] = 8] = "BACKSPACE";
|
|
1938
|
+
/** Delete key */
|
|
1939
|
+
KeyCodeEnum[KeyCodeEnum["DELETE"] = 46] = "DELETE";
|
|
1940
|
+
/** Arrow Left key */
|
|
1941
|
+
KeyCodeEnum[KeyCodeEnum["LEFT"] = 37] = "LEFT";
|
|
1942
|
+
/** Arrow Right key */
|
|
1943
|
+
KeyCodeEnum[KeyCodeEnum["RIGHT"] = 39] = "RIGHT";
|
|
1944
|
+
/** Shift key */
|
|
1945
|
+
KeyCodeEnum[KeyCodeEnum["SHIFT"] = 16] = "SHIFT";
|
|
1946
|
+
/** Control key */
|
|
1947
|
+
KeyCodeEnum[KeyCodeEnum["CONTROL"] = 17] = "CONTROL";
|
|
1948
|
+
/** Alt key */
|
|
1949
|
+
KeyCodeEnum[KeyCodeEnum["ALT"] = 18] = "ALT";
|
|
1950
|
+
/** Caps Lock key */
|
|
1951
|
+
KeyCodeEnum[KeyCodeEnum["CAPS_LOCK"] = 20] = "CAPS_LOCK";
|
|
1952
|
+
/** F1 key */
|
|
1953
|
+
KeyCodeEnum[KeyCodeEnum["F1"] = 112] = "F1";
|
|
1954
|
+
/** F2 key */
|
|
1955
|
+
KeyCodeEnum[KeyCodeEnum["F2"] = 113] = "F2";
|
|
1956
|
+
/** F3 key */
|
|
1957
|
+
KeyCodeEnum[KeyCodeEnum["F3"] = 114] = "F3";
|
|
1958
|
+
/** F4 key */
|
|
1959
|
+
KeyCodeEnum[KeyCodeEnum["F4"] = 115] = "F4";
|
|
1960
|
+
/** F5 key */
|
|
1961
|
+
KeyCodeEnum[KeyCodeEnum["F5"] = 116] = "F5";
|
|
1962
|
+
/** F6 key */
|
|
1963
|
+
KeyCodeEnum[KeyCodeEnum["F6"] = 117] = "F6";
|
|
1964
|
+
/** F7 key */
|
|
1965
|
+
KeyCodeEnum[KeyCodeEnum["F7"] = 118] = "F7";
|
|
1966
|
+
/** F8 key */
|
|
1967
|
+
KeyCodeEnum[KeyCodeEnum["F8"] = 119] = "F8";
|
|
1968
|
+
/** F9 key */
|
|
1969
|
+
KeyCodeEnum[KeyCodeEnum["F9"] = 120] = "F9";
|
|
1970
|
+
/** F10 key */
|
|
1971
|
+
KeyCodeEnum[KeyCodeEnum["F10"] = 121] = "F10";
|
|
1972
|
+
/** F11 key */
|
|
1973
|
+
KeyCodeEnum[KeyCodeEnum["F11"] = 122] = "F11";
|
|
1974
|
+
/** F12 key */
|
|
1975
|
+
KeyCodeEnum[KeyCodeEnum["F12"] = 123] = "F12";
|
|
1976
|
+
})(KeyCodeEnum || (KeyCodeEnum = {}));
|
|
1762
1977
|
|
|
1763
1978
|
/**
|
|
1764
|
-
*
|
|
1979
|
+
* Enum for different storage keys used in the application.
|
|
1980
|
+
* This enum contains the keys for storing authentication token, locale information, user info, roles, and more.
|
|
1765
1981
|
* @readonly
|
|
1982
|
+
* @enum {string}
|
|
1766
1983
|
*/
|
|
1767
|
-
|
|
1984
|
+
var StorageKeyEnum;
|
|
1985
|
+
(function (StorageKeyEnum) {
|
|
1768
1986
|
/**
|
|
1769
|
-
*
|
|
1770
|
-
* @constant
|
|
1987
|
+
* Key used for storing the authentication token.
|
|
1988
|
+
* @constant {string}
|
|
1771
1989
|
*/
|
|
1772
|
-
|
|
1990
|
+
StorageKeyEnum["TOKEN_KEY"] = "TOKEN__";
|
|
1773
1991
|
/**
|
|
1774
|
-
*
|
|
1775
|
-
* @constant
|
|
1992
|
+
* Key used for storing the locale information.
|
|
1993
|
+
* @constant {string}
|
|
1776
1994
|
*/
|
|
1777
|
-
|
|
1995
|
+
StorageKeyEnum["LOCALE_KEY"] = "LOCALE__";
|
|
1778
1996
|
/**
|
|
1779
|
-
*
|
|
1780
|
-
* @constant
|
|
1997
|
+
* Key used for storing user information.
|
|
1998
|
+
* @constant {string}
|
|
1781
1999
|
*/
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
2000
|
+
StorageKeyEnum["USER_INFO_KEY"] = "USER__INFO__";
|
|
2001
|
+
/**
|
|
2002
|
+
* Key used for storing role information.
|
|
2003
|
+
* @constant {string}
|
|
2004
|
+
*/
|
|
2005
|
+
StorageKeyEnum["ROLES_KEY"] = "ROLES__KEY__";
|
|
2006
|
+
/**
|
|
2007
|
+
* Key used for storing project configuration.
|
|
2008
|
+
* @constant {string}
|
|
2009
|
+
*/
|
|
2010
|
+
StorageKeyEnum["PROJ_CFG_KEY"] = "PROJ__CFG__KEY__";
|
|
2011
|
+
/**
|
|
2012
|
+
* Key used for storing lock information.
|
|
2013
|
+
* @constant {string}
|
|
2014
|
+
*/
|
|
2015
|
+
StorageKeyEnum["LOCK_INFO_KEY"] = "LOCK__INFO__KEY__";
|
|
2016
|
+
/**
|
|
2017
|
+
* Key used for base global local cache.
|
|
2018
|
+
* @constant {string}
|
|
2019
|
+
*/
|
|
2020
|
+
StorageKeyEnum["APP_LOCAL_CACHE_KEY"] = "COMMON__LOCAL__KEY";
|
|
2021
|
+
/**
|
|
2022
|
+
* Key used for base global session cache.
|
|
2023
|
+
* @constant {string}
|
|
2024
|
+
*/
|
|
2025
|
+
StorageKeyEnum["APP_SESSION_CACHE_KEY"] = "COMMON__SESSION__KEY";
|
|
2026
|
+
})(StorageKeyEnum || (StorageKeyEnum = {}));
|
|
1785
2027
|
/**
|
|
1786
|
-
*
|
|
2028
|
+
* Enum defining types of storage.
|
|
1787
2029
|
* @readonly
|
|
2030
|
+
* @enum {number}
|
|
1788
2031
|
*/
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
2032
|
+
const StorageTypeEnum = {
|
|
2033
|
+
/**
|
|
2034
|
+
* Represents session storage.
|
|
2035
|
+
* @constant {number}
|
|
2036
|
+
*/
|
|
2037
|
+
SESSION: 0,
|
|
2038
|
+
/**
|
|
2039
|
+
* Represents local storage.
|
|
2040
|
+
* @constant {number}
|
|
2041
|
+
*/
|
|
2042
|
+
LOCAL: 1,
|
|
1794
2043
|
};
|
|
1795
2044
|
|
|
1796
2045
|
/**
|
|
1797
|
-
*
|
|
1798
|
-
* @
|
|
1799
|
-
*/
|
|
1800
|
-
const TOKEN_KEY = 'TOKEN__';
|
|
1801
|
-
/**
|
|
1802
|
-
* Key used for storing the locale information.
|
|
1803
|
-
* @constant {string}
|
|
1804
|
-
*/
|
|
1805
|
-
const LOCALE_KEY = 'LOCALE__';
|
|
1806
|
-
/**
|
|
1807
|
-
* Key used for storing user information.
|
|
1808
|
-
* @constant {string}
|
|
1809
|
-
*/
|
|
1810
|
-
const USER_INFO_KEY = 'USER__INFO__';
|
|
1811
|
-
/**
|
|
1812
|
-
* Key used for storing role information.
|
|
1813
|
-
* @constant {string}
|
|
1814
|
-
*/
|
|
1815
|
-
const ROLES_KEY = 'ROLES__KEY__';
|
|
1816
|
-
/**
|
|
1817
|
-
* Key used for storing project configuration.
|
|
1818
|
-
* @constant {string}
|
|
1819
|
-
*/
|
|
1820
|
-
const PROJ_CFG_KEY = 'PROJ__CFG__KEY__';
|
|
1821
|
-
/**
|
|
1822
|
-
* Key used for storing lock information.
|
|
1823
|
-
* @constant {string}
|
|
1824
|
-
*/
|
|
1825
|
-
const LOCK_INFO_KEY = 'LOCK__INFO__KEY__';
|
|
1826
|
-
/**
|
|
1827
|
-
* Key used for base global local cache.
|
|
1828
|
-
* @constant {string}
|
|
2046
|
+
* Enum representing different types of errors.
|
|
2047
|
+
* @readonly
|
|
1829
2048
|
*/
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
2049
|
+
var ErrorEnum;
|
|
2050
|
+
(function (ErrorEnum) {
|
|
2051
|
+
ErrorEnum["WARNING"] = "warning";
|
|
2052
|
+
ErrorEnum["ERROR"] = "error";
|
|
2053
|
+
ErrorEnum["CRITICAL"] = "critical";
|
|
2054
|
+
ErrorEnum["VALIDATION"] = "validation";
|
|
2055
|
+
ErrorEnum["COMPONENT"] = "component";
|
|
2056
|
+
ErrorEnum["NETWORK"] = "network";
|
|
2057
|
+
ErrorEnum["AUTHENTICATION"] = "authentication";
|
|
2058
|
+
ErrorEnum["RUNTIME"] = "runtime";
|
|
2059
|
+
ErrorEnum["TYPE"] = "type";
|
|
2060
|
+
ErrorEnum["REFERENCE"] = "reference";
|
|
2061
|
+
ErrorEnum["SYNTAX"] = "syntax";
|
|
2062
|
+
ErrorEnum["RANGE"] = "range";
|
|
2063
|
+
ErrorEnum["EVAL"] = "eval";
|
|
2064
|
+
ErrorEnum["URI"] = "uri";
|
|
2065
|
+
})(ErrorEnum || (ErrorEnum = {}));
|
|
2066
|
+
/**
|
|
2067
|
+
* Enum representing different error messages.
|
|
2068
|
+
* @readonly
|
|
1834
2069
|
*/
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
2070
|
+
var ErrorMessages;
|
|
2071
|
+
(function (ErrorMessages) {
|
|
2072
|
+
ErrorMessages["WARNING"] = "Algo no est\u00E1 del todo bien. Verifica y vuelve a intentar.";
|
|
2073
|
+
ErrorMessages["ERROR"] = "Ocurri\u00F3 un error inesperado.";
|
|
2074
|
+
ErrorMessages["CRITICAL"] = "Error cr\u00EDtico. Contacta al soporte t\u00E9cnico.";
|
|
2075
|
+
ErrorMessages["VALIDATION"] = "Hay errores en el formulario. Revisa los campos.";
|
|
2076
|
+
ErrorMessages["COMPONENT"] = "Error en la carga del componente. Intenta recargar.";
|
|
2077
|
+
ErrorMessages["NETWORK"] = "Problema de conexi\u00F3n. Verifica tu internet.";
|
|
2078
|
+
ErrorMessages["AUTHENTICATION"] = "No tienes permisos para realizar esta acci\u00F3n.";
|
|
2079
|
+
ErrorMessages["RUNTIME"] = "Error de ejecuci\u00F3n. Intenta nuevamente.";
|
|
2080
|
+
ErrorMessages["TYPE"] = "Tipo de error no identificado.";
|
|
2081
|
+
ErrorMessages["REFERENCE"] = "Referencia no v\u00E1lida.";
|
|
2082
|
+
ErrorMessages["SYNTAX"] = "Error de sintaxis en el c\u00F3digo.";
|
|
2083
|
+
ErrorMessages["RANGE"] = "Error en el rango de valores.";
|
|
2084
|
+
ErrorMessages["EVAL"] = "Error en la evaluaci\u00F3n.";
|
|
2085
|
+
ErrorMessages["URI"] = "URI no v\u00E1lida.";
|
|
2086
|
+
})(ErrorMessages || (ErrorMessages = {}));
|
|
2087
|
+
/**
|
|
2088
|
+
* Enum representing different error styles.
|
|
1838
2089
|
* @readonly
|
|
1839
2090
|
*/
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
2091
|
+
var ErrorStyles;
|
|
2092
|
+
(function (ErrorStyles) {
|
|
2093
|
+
ErrorStyles["WARNING"] = "color: orange; font-weight: bold;";
|
|
2094
|
+
ErrorStyles["ERROR"] = "color: red; font-weight: bold;";
|
|
2095
|
+
ErrorStyles["CRITICAL"] = "color: white; background-color: red; font-weight: bold; padding: 2px;";
|
|
2096
|
+
ErrorStyles["VALIDATION"] = "color: blue; font-weight: bold;";
|
|
2097
|
+
ErrorStyles["COMPONENT"] = "color: purple; font-weight: bold;";
|
|
2098
|
+
ErrorStyles["NETWORK"] = "color: cyan; font-weight: bold;";
|
|
2099
|
+
ErrorStyles["AUTHENTICATION"] = "color: brown; font-weight: bold;";
|
|
2100
|
+
ErrorStyles["RUNTIME"] = "color: darkred; font-weight: bold;";
|
|
2101
|
+
ErrorStyles["TYPE"] = "color: gray; font-weight: bold;";
|
|
2102
|
+
ErrorStyles["REFERENCE"] = "color: darkorange; font-weight: bold;";
|
|
2103
|
+
ErrorStyles["SYNTAX"] = "color: darkblue; font-weight: bold;";
|
|
2104
|
+
ErrorStyles["RANGE"] = "color: darkgreen; font-weight: bold;";
|
|
2105
|
+
ErrorStyles["EVAL"] = "color: darkviolet; font-weight: bold;";
|
|
2106
|
+
ErrorStyles["URI"] = "color: darkcyan; font-weight: bold;";
|
|
2107
|
+
})(ErrorStyles || (ErrorStyles = {}));
|
|
2108
|
+
/**
|
|
2109
|
+
* A record mapping ErrorEnum to their corresponding error messages.
|
|
2110
|
+
*/
|
|
1847
2111
|
const ERROR_MESSAGES = {
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
2112
|
+
[ErrorEnum.WARNING]: ErrorMessages.WARNING,
|
|
2113
|
+
[ErrorEnum.ERROR]: ErrorMessages.ERROR,
|
|
2114
|
+
[ErrorEnum.CRITICAL]: ErrorMessages.CRITICAL,
|
|
2115
|
+
[ErrorEnum.VALIDATION]: ErrorMessages.VALIDATION,
|
|
2116
|
+
[ErrorEnum.COMPONENT]: ErrorMessages.COMPONENT,
|
|
2117
|
+
[ErrorEnum.NETWORK]: ErrorMessages.NETWORK,
|
|
2118
|
+
[ErrorEnum.AUTHENTICATION]: ErrorMessages.AUTHENTICATION,
|
|
2119
|
+
[ErrorEnum.RUNTIME]: ErrorMessages.RUNTIME,
|
|
2120
|
+
[ErrorEnum.TYPE]: ErrorMessages.TYPE,
|
|
2121
|
+
[ErrorEnum.REFERENCE]: ErrorMessages.REFERENCE,
|
|
2122
|
+
[ErrorEnum.SYNTAX]: ErrorMessages.SYNTAX,
|
|
2123
|
+
[ErrorEnum.RANGE]: ErrorMessages.RANGE,
|
|
2124
|
+
[ErrorEnum.EVAL]: ErrorMessages.EVAL,
|
|
2125
|
+
[ErrorEnum.URI]: ErrorMessages.URI,
|
|
1862
2126
|
};
|
|
2127
|
+
/**
|
|
2128
|
+
* A record mapping ErrorEnum to their corresponding error styles.
|
|
2129
|
+
*/
|
|
1863
2130
|
const ERROR_STYLES = {
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
2131
|
+
[ErrorEnum.WARNING]: ErrorStyles.WARNING,
|
|
2132
|
+
[ErrorEnum.ERROR]: ErrorStyles.ERROR,
|
|
2133
|
+
[ErrorEnum.CRITICAL]: ErrorStyles.CRITICAL,
|
|
2134
|
+
[ErrorEnum.VALIDATION]: ErrorStyles.VALIDATION,
|
|
2135
|
+
[ErrorEnum.COMPONENT]: ErrorStyles.COMPONENT,
|
|
2136
|
+
[ErrorEnum.NETWORK]: ErrorStyles.NETWORK,
|
|
2137
|
+
[ErrorEnum.AUTHENTICATION]: ErrorStyles.AUTHENTICATION,
|
|
2138
|
+
[ErrorEnum.RUNTIME]: ErrorStyles.RUNTIME,
|
|
2139
|
+
[ErrorEnum.TYPE]: ErrorStyles.TYPE,
|
|
2140
|
+
[ErrorEnum.REFERENCE]: ErrorStyles.REFERENCE,
|
|
2141
|
+
[ErrorEnum.SYNTAX]: ErrorStyles.SYNTAX,
|
|
2142
|
+
[ErrorEnum.RANGE]: ErrorStyles.RANGE,
|
|
2143
|
+
[ErrorEnum.EVAL]: ErrorStyles.EVAL,
|
|
2144
|
+
[ErrorEnum.URI]: ErrorStyles.URI,
|
|
1878
2145
|
};
|
|
1879
2146
|
|
|
1880
2147
|
class RestStd {
|
|
@@ -1908,7 +2175,7 @@ class RestStd {
|
|
|
1908
2175
|
* @param options Additional options for the fetch composable.
|
|
1909
2176
|
* @returns The result of the fetch composable (typically a promise).
|
|
1910
2177
|
*/
|
|
1911
|
-
static
|
|
2178
|
+
static getAll(params, options = {}) {
|
|
1912
2179
|
return this.fetchComposable({
|
|
1913
2180
|
method: 'GET',
|
|
1914
2181
|
url: this.resource,
|
|
@@ -2117,46 +2384,69 @@ function inferErrorType(error) {
|
|
|
2117
2384
|
return 'error';
|
|
2118
2385
|
}
|
|
2119
2386
|
|
|
2120
|
-
let
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
*
|
|
2127
|
-
*
|
|
2128
|
-
*
|
|
2387
|
+
let secretKey = "12345678901234567890123456789012";
|
|
2388
|
+
let tokenConfig = Object.freeze({
|
|
2389
|
+
ACCESS_TOKEN: "authToken",
|
|
2390
|
+
REFRESH_TOKEN: "refreshToken",
|
|
2391
|
+
});
|
|
2392
|
+
/**
|
|
2393
|
+
* Configures the global keys for access and refresh tokens.
|
|
2394
|
+
* Once set, they cannot be modified.
|
|
2395
|
+
*
|
|
2396
|
+
* @param {string} accessTokenKey - The name of the access token key.
|
|
2397
|
+
* @param {string} refreshTokenKey - The name of the refresh token key.
|
|
2398
|
+
*
|
|
2399
|
+
* @returns {void} Does not return anything but freezes the token configuration object.
|
|
2129
2400
|
*/
|
|
2130
|
-
function
|
|
2401
|
+
function configTokens(accessTokenKey, refreshTokenKey) {
|
|
2131
2402
|
tokenConfig = Object.freeze({
|
|
2132
2403
|
ACCESS_TOKEN: accessTokenKey,
|
|
2133
2404
|
REFRESH_TOKEN: refreshTokenKey,
|
|
2134
2405
|
});
|
|
2135
2406
|
}
|
|
2136
2407
|
/**
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2408
|
+
* Retrieves the current token configuration.
|
|
2409
|
+
*
|
|
2410
|
+
* @returns {TokenConfig} The configuration of the access and refresh token keys.
|
|
2139
2411
|
*/
|
|
2140
2412
|
function getTokenConfig() {
|
|
2141
2413
|
return tokenConfig;
|
|
2142
2414
|
}
|
|
2415
|
+
/**
|
|
2416
|
+
* Sets the secret key for use in authentication.
|
|
2417
|
+
*
|
|
2418
|
+
* @param {string} key - The new secret key.
|
|
2419
|
+
*
|
|
2420
|
+
* @returns {void} Does not return anything, but updates the secret key.
|
|
2421
|
+
*/
|
|
2422
|
+
function setSecretKey(key) {
|
|
2423
|
+
secretKey = key;
|
|
2424
|
+
}
|
|
2425
|
+
/**
|
|
2426
|
+
* Retrieves the current secret key.
|
|
2427
|
+
*
|
|
2428
|
+
* @returns {string} The configured secret key.
|
|
2429
|
+
*/
|
|
2430
|
+
function getSecretKey() {
|
|
2431
|
+
return secretKey;
|
|
2432
|
+
}
|
|
2143
2433
|
|
|
2144
2434
|
let endpointsConfig = {
|
|
2145
|
-
LOGIN:
|
|
2146
|
-
REFRESH:
|
|
2147
|
-
LOGOUT:
|
|
2435
|
+
LOGIN: "/login",
|
|
2436
|
+
REFRESH: "/refresh",
|
|
2437
|
+
LOGOUT: "/logout",
|
|
2148
2438
|
};
|
|
2149
2439
|
/**
|
|
2150
|
-
*
|
|
2151
|
-
*
|
|
2440
|
+
* Configures authentication endpoint URLs globally.
|
|
2441
|
+
* This function freezes the object to prevent further modifications.
|
|
2152
2442
|
*
|
|
2153
|
-
* @param {string} loginEndpoint - URL
|
|
2154
|
-
* @param {string} refreshEndpoint - URL
|
|
2155
|
-
* @param {string} logoutEndpoint - URL
|
|
2443
|
+
* @param {string} loginEndpoint - URL of the login endpoint.
|
|
2444
|
+
* @param {string} refreshEndpoint - URL of the refresh token endpoint.
|
|
2445
|
+
* @param {string} logoutEndpoint - URL of the logout endpoint.
|
|
2156
2446
|
*
|
|
2157
|
-
* @returns {void}
|
|
2447
|
+
* @returns {void} Does not return anything but freezes the endpoint configuration object.
|
|
2158
2448
|
*/
|
|
2159
|
-
function
|
|
2449
|
+
function configEndpoints(loginEndpoint, refreshEndpoint, logoutEndpoint) {
|
|
2160
2450
|
endpointsConfig = Object.freeze({
|
|
2161
2451
|
LOGIN: loginEndpoint,
|
|
2162
2452
|
REFRESH: refreshEndpoint,
|
|
@@ -2164,12 +2454,12 @@ function configureEndpoints(loginEndpoint, refreshEndpoint, logoutEndpoint) {
|
|
|
2164
2454
|
});
|
|
2165
2455
|
}
|
|
2166
2456
|
/**
|
|
2167
|
-
*
|
|
2457
|
+
* Retrieves the configured authentication endpoint URLs.
|
|
2168
2458
|
*
|
|
2169
|
-
* @returns {
|
|
2170
|
-
* @
|
|
2171
|
-
* @
|
|
2172
|
-
* @
|
|
2459
|
+
* @returns {EndpointsConfig} An object containing the configured authentication endpoints.
|
|
2460
|
+
* @property {string} LOGIN - URL of the login endpoint.
|
|
2461
|
+
* @property {string} REFRESH - URL of the refresh token endpoint.
|
|
2462
|
+
* @property {string} LOGOUT - URL of the logout endpoint.
|
|
2173
2463
|
*/
|
|
2174
2464
|
function getEndpointsConfig() {
|
|
2175
2465
|
return endpointsConfig;
|
|
@@ -2306,7 +2596,7 @@ let axiosInstance;
|
|
|
2306
2596
|
* Configures the global Axios instance with a base URL.
|
|
2307
2597
|
* @param {string} baseURL - The base URL for the Axios instance.
|
|
2308
2598
|
*/
|
|
2309
|
-
const
|
|
2599
|
+
const configAxios = (baseURL) => {
|
|
2310
2600
|
axiosInstance = new AxiosService(baseURL);
|
|
2311
2601
|
};
|
|
2312
2602
|
/**
|
|
@@ -2697,4 +2987,4 @@ function useSorter(items, criteriaList, selectedCriteria) {
|
|
|
2697
2987
|
}).value;
|
|
2698
2988
|
}
|
|
2699
2989
|
|
|
2700
|
-
export {
|
|
2990
|
+
export { AppTypes, ArchiveTypes, AudioTypes, AxiosService, ContentTypeEnum, DocumentTypes, ERROR_MESSAGES, ERROR_STYLES, ErrorEnum, ErrorMessages, ErrorStyles, ExceptionEnum, FontTypes, ImageTypes, KeyCodeEnum, OtherTypes, RestStd, ScreenBreakpoint, ScreenSize, StorageKeyEnum, StorageTypeEnum, TextTypes, VideoTypes, addCustomKeyboardShortcut, addDays, addDoubleClickListener, addKeyListener, ageAtDate, axiosFetch, blobToFormData, bufferToBlob, calculateAge, clickOutside, compareObject, configAxios, configEndpoints, configTokens, copyToClipboard, countWords, createCustomAxiosInstance, createFetch, createKeyMap, customShortcut, daysBetween, daysToNextBirthday, debounce, debounceAsync, debounceAsyncValidator, debounceAsyncWithImmediate, debounceLeading, debounceLeadingTrailing, debounceTrailing, deepClone, deepEqual, deepMerge, detectKeyHold, disableCopy, disableF12Key, disableMouseButtons, disableRightClick, disableSpecificKeys, downloadBlob, enableMouseButtons, enableRightClick, enableSpecificKeys, exportToCSV, exportToExcel, exportToJSON, exportToText, exportToXML, filterObjectByKeys, flattenObject, formDataToObject, formatDate, generateRandomString, getAxiosInstance, getEndOfMonth, getEndpointsConfig, getObjectDifferences, getObjectKeys, getQueryParam, getSecretKey, getStartOfMonth, getTokenConfig, hasNestedProperties, isEmptyObject, isLeapYear, isStrongPassword, isValidAge, isValidCreditCard, isValidDate, isValidEmail, isValidExpiryDate, isValidHexColor, isValidHexColorAlpha, isValidHexNumber, isValidIP, isValidPhoneNumber, isValidSSN, isValidTime, isValidURL, isValidUsername, isValidZIP, lowerFirst, objectToFormData, objectToFormDataEnhanced, objectToQueryString, openWindow, parseDate, proxyToPlainObject, readFileAsDataURL, readFileAsText, registerKeyboardShortcuts, removeAccent, removeClickOutside, removeCustomKeyboardShortcut, removeCustomShortcuts, removeDoubleClickListener, removeEmptyProperties, removeKeyListeners, replaceAll, reverseString, safeGet, screenMap, scrollToTop, setSecretKey, simulateKeyPress, stopDetectingKeyHold, stringToBlob, subtractDays, throttle, toCamelCase, toKebabCase, toggleTabNavigation, truncateString, unregisterKeyboardShortcuts, upperFirst, useBreakpoint, useFilter, usePagination, useSorter, useVueQuery, validateAlphanumeric, validateLetters, validateNumbers };
|