@shadow-library/ui 0.1.0 → 0.1.2
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/components/AppLayout/AppLayout.d.ts +9 -7
- package/components/AppLayout/AppLayout.js +28 -22
- package/components/AppLayout/AppLayout.js.map +1 -1
- package/components/AppLayout/AppLayout.module.css.js +4 -0
- package/components/AppLayout/AppLayout.module.css.js.map +1 -0
- package/components/AppLayout/ContentFooter.d.ts +3 -4
- package/components/AppLayout/ContentFooter.js +10 -15
- package/components/AppLayout/ContentFooter.js.map +1 -1
- package/components/AppLayout/SideNavbar.d.ts +8 -8
- package/components/AppLayout/SideNavbar.js +41 -17
- package/components/AppLayout/SideNavbar.js.map +1 -1
- package/components/AppLayout/SideNavbarGroup.d.ts +19 -0
- package/components/AppLayout/SideNavbarGroup.js +16 -0
- package/components/AppLayout/SideNavbarGroup.js.map +1 -0
- package/components/AppLayout/SideNavbarItem.d.ts +8 -3
- package/components/AppLayout/SideNavbarItem.js +71 -28
- package/components/AppLayout/SideNavbarItem.js.map +1 -1
- package/components/AppLayout/TopNavbar.d.ts +7 -3
- package/components/AppLayout/TopNavbar.js +37 -18
- package/components/AppLayout/TopNavbar.js.map +1 -1
- package/components/AppLayout/app-layout.utils.d.ts +14 -0
- package/components/AppLayout/app-layout.utils.js +6 -0
- package/components/AppLayout/app-layout.utils.js.map +1 -0
- package/components/AppLayout/hooks/use-active-nav-label.d.ts +2 -0
- package/components/AppLayout/hooks/use-active-nav-label.js +29 -0
- package/components/AppLayout/hooks/use-active-nav-label.js.map +1 -0
- package/components/AppLayout/hooks/use-layout-state.js +11 -13
- package/components/AppLayout/hooks/use-layout-state.js.map +1 -1
- package/components/AppLayout/hooks/use-side-navbar-item.d.ts +4 -4
- package/components/AppLayout/hooks/use-side-navbar-item.js +21 -32
- package/components/AppLayout/hooks/use-side-navbar-item.js.map +1 -1
- package/components/AppLayout/index.d.ts +1 -1
- package/components/AppLayout/layout.types.d.ts +9 -9
- package/components/Logo/Alphabets.d.ts +2 -7
- package/components/Logo/Alphabets.js +119 -31
- package/components/Logo/Alphabets.js.map +1 -1
- package/components/Logo/BrandMark.js +38 -16
- package/components/Logo/BrandMark.js.map +1 -1
- package/components/Logo/Logo.js +17 -13
- package/components/Logo/Logo.js.map +1 -1
- package/components/Logo/Logo.module.css.js +4 -0
- package/components/Logo/Logo.module.css.js.map +1 -0
- package/components/Logo/hooks/use-logo.js +13 -15
- package/components/Logo/hooks/use-logo.js.map +1 -1
- package/hooks/useSearchParams.js +16 -19
- package/hooks/useSearchParams.js.map +1 -1
- package/index.d.ts +6 -4
- package/index.js +10 -5
- package/index.js.map +1 -1
- package/lib/api-error.js +16 -20
- package/lib/api-error.js.map +1 -1
- package/lib/api-request.d.ts +2 -2
- package/lib/api-request.js +105 -117
- package/lib/api-request.js.map +1 -1
- package/lib/generate-api.js +193 -230
- package/lib/generate-api.js.map +1 -1
- package/lib/utils.js +5 -21
- package/lib/utils.js.map +1 -1
- package/package.json +22 -4
- package/styles/AppLayout.module.css +82 -0
- package/styles/Logo.module.css +51 -0
- package/styles.css +2 -0
- package/styles.css.map +1 -0
- package/styles.layer.css +4 -0
- package/theme.d.ts +6 -6
- package/theme.js +111 -114
- package/theme.js.map +1 -1
- package/types.d.ts +1 -0
- package/components/AppLayout/index.js +0 -3
- package/components/AppLayout/index.js.map +0 -1
- package/components/AppLayout/layout.types.js +0 -2
- package/components/AppLayout/layout.types.js.map +0 -1
- package/components/Logo/index.js +0 -3
- package/components/Logo/index.js.map +0 -1
- package/hooks/index.js +0 -2
- package/hooks/index.js.map +0 -1
- package/lib/index.js +0 -5
- package/lib/index.js.map +0 -1
- package/types.js +0 -5
- package/types.js.map +0 -1
package/lib/api-request.js
CHANGED
|
@@ -1,119 +1,107 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Importing npm packages
|
|
3
|
-
*/
|
|
4
1
|
import { ApiError } from './api-error.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
options;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
// biome-ignore lint/suspicious/noThenProperty: This class is designed to be thenable for convenient usage in async contexts
|
|
109
|
-
then(resolve, reject) {
|
|
110
|
-
return this.execute().then(resolve, reject);
|
|
111
|
-
}
|
|
112
|
-
catch(reject) {
|
|
113
|
-
return this.execute().catch(reject);
|
|
114
|
-
}
|
|
115
|
-
finally(callback) {
|
|
116
|
-
return this.execute().finally(callback);
|
|
117
|
-
}
|
|
2
|
+
|
|
3
|
+
class APIRequest {
|
|
4
|
+
static baseUrl = "/api/v1";
|
|
5
|
+
static preRequestHook = null;
|
|
6
|
+
static postResponseHook = null;
|
|
7
|
+
options;
|
|
8
|
+
constructor(path, method) {
|
|
9
|
+
this.options = { path, method, headers: {}, query: {} };
|
|
10
|
+
}
|
|
11
|
+
static get(path) {
|
|
12
|
+
return new APIRequest(path, "GET");
|
|
13
|
+
}
|
|
14
|
+
static post(path) {
|
|
15
|
+
return new APIRequest(path, "POST");
|
|
16
|
+
}
|
|
17
|
+
static put(path) {
|
|
18
|
+
return new APIRequest(path, "PUT");
|
|
19
|
+
}
|
|
20
|
+
static patch(path) {
|
|
21
|
+
return new APIRequest(path, "PATCH");
|
|
22
|
+
}
|
|
23
|
+
static delete(path) {
|
|
24
|
+
return new APIRequest(path, "DELETE");
|
|
25
|
+
}
|
|
26
|
+
static setBaseUrl(baseUrl) {
|
|
27
|
+
APIRequest.baseUrl = baseUrl;
|
|
28
|
+
}
|
|
29
|
+
static setPreRequestHook(hook) {
|
|
30
|
+
APIRequest.preRequestHook = hook;
|
|
31
|
+
}
|
|
32
|
+
static setPostResponseHook(hook) {
|
|
33
|
+
APIRequest.postResponseHook = hook;
|
|
34
|
+
}
|
|
35
|
+
header(key, value) {
|
|
36
|
+
this.options.headers[key] = value;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
query(keyOrParams, value) {
|
|
40
|
+
if (typeof keyOrParams === "string") this.options.query[keyOrParams] = String(value);
|
|
41
|
+
else {
|
|
42
|
+
for (const [k, v] of Object.entries(keyOrParams)) {
|
|
43
|
+
if (v !== void 0) this.options.query[k] = String(v);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
field(key, value) {
|
|
49
|
+
if (!this.options.data) this.options.data = {};
|
|
50
|
+
const keys = key.split(".");
|
|
51
|
+
let pointer = this.options.data;
|
|
52
|
+
for (let index = 0; index < keys.length - 1; index++) {
|
|
53
|
+
const currentKey = keys[index];
|
|
54
|
+
if (!pointer[currentKey]) pointer[currentKey] = {};
|
|
55
|
+
pointer = pointer[currentKey];
|
|
56
|
+
}
|
|
57
|
+
pointer[keys[keys.length - 1]] = value;
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
body(data) {
|
|
61
|
+
this.options.data = data;
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
async execute() {
|
|
65
|
+
const { path, method, headers, query, data } = this.options;
|
|
66
|
+
const queryString = Object.keys(query).length > 0 ? `?${new URLSearchParams(query).toString()}` : "";
|
|
67
|
+
const url = path.startsWith("http://") || path.startsWith("https://") ? `${path}${queryString}` : `${APIRequest.baseUrl}${path}${queryString}`;
|
|
68
|
+
const init = { method, headers };
|
|
69
|
+
if (data) {
|
|
70
|
+
headers["content-type"] = "application/json";
|
|
71
|
+
init.body = JSON.stringify(data);
|
|
72
|
+
}
|
|
73
|
+
let response;
|
|
74
|
+
try {
|
|
75
|
+
const options = { ...this.options };
|
|
76
|
+
if (APIRequest.preRequestHook) await APIRequest.preRequestHook({ url, init, options });
|
|
77
|
+
response = await fetch(url, init);
|
|
78
|
+
if (APIRequest.postResponseHook) await APIRequest.postResponseHook({ response, options });
|
|
79
|
+
} catch {
|
|
80
|
+
throw new ApiError(-1, { code: "NETWORK_ERROR", type: "NetworkError", message: "Unable to reach the server" });
|
|
81
|
+
}
|
|
82
|
+
if (!response.ok) {
|
|
83
|
+
let body;
|
|
84
|
+
try {
|
|
85
|
+
body = await response.json();
|
|
86
|
+
} catch {
|
|
87
|
+
throw new ApiError(response.status, { code: "UNKNOWN_ERROR", type: "UnknownError", message: `Request failed with status ${response.status}` });
|
|
88
|
+
}
|
|
89
|
+
throw new ApiError(response.status, body);
|
|
90
|
+
}
|
|
91
|
+
if (response.status === 204) return void 0;
|
|
92
|
+
return response.json();
|
|
93
|
+
}
|
|
94
|
+
// biome-ignore lint/suspicious/noThenProperty: This class is designed to be thenable for convenient usage in async contexts
|
|
95
|
+
then(resolve, reject) {
|
|
96
|
+
return this.execute().then(resolve, reject);
|
|
97
|
+
}
|
|
98
|
+
catch(reject) {
|
|
99
|
+
return this.execute().catch(reject);
|
|
100
|
+
}
|
|
101
|
+
finally(callback) {
|
|
102
|
+
return this.execute().finally(callback);
|
|
103
|
+
}
|
|
118
104
|
}
|
|
119
|
-
|
|
105
|
+
|
|
106
|
+
export { APIRequest };
|
|
107
|
+
//# sourceMappingURL=api-request.js.map
|
package/lib/api-request.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-request.js","
|
|
1
|
+
{"version":3,"file":"api-request.js","sources":["../../src/lib/api-request.ts"],"sourcesContent":["/**\n * Importing npm packages\n */\n\n/**\n * Importing user defined packages\n */\nimport { type JsonObject, type JsonValue, type VoidFn } from '@/types';\n\nimport { ApiError, type ErrorResponse } from './api-error';\n\n/**\n * Defining types\n */\n\nexport interface APIRequestOptions {\n path: string;\n method: string;\n headers: Record<string, string>;\n query: Record<string, string>;\n data?: JsonObject;\n}\n\nexport interface PreRequestContext {\n url: string;\n init: RequestInit;\n options: Readonly<APIRequestOptions>;\n}\n\nexport interface PostResponseContext {\n response: Response;\n options: Readonly<APIRequestOptions>;\n}\n\nexport type PreRequestHook = (context: PreRequestContext) => void | Promise<void>;\n\nexport type PostResponseHook = (context: PostResponseContext) => void | Promise<void>;\n\nexport type QueryParams = Record<string, string | number | boolean | undefined>;\n\n/**\n * Declaring the constants\n */\n\nexport class APIRequest {\n private static baseUrl = '/api/v1';\n private static preRequestHook: PreRequestHook | null = null;\n private static postResponseHook: PostResponseHook | null = null;\n\n private readonly options: APIRequestOptions;\n\n private constructor(path: string, method: string) {\n this.options = { path, method, headers: {}, query: {} };\n }\n\n static get(path: string): APIRequest {\n return new APIRequest(path, 'GET');\n }\n\n static post(path: string): APIRequest {\n return new APIRequest(path, 'POST');\n }\n\n static put(path: string): APIRequest {\n return new APIRequest(path, 'PUT');\n }\n\n static patch(path: string): APIRequest {\n return new APIRequest(path, 'PATCH');\n }\n\n static delete(path: string): APIRequest {\n return new APIRequest(path, 'DELETE');\n }\n\n static setBaseUrl(baseUrl: string): void {\n APIRequest.baseUrl = baseUrl;\n }\n\n static setPreRequestHook(hook: PreRequestHook | null): void {\n APIRequest.preRequestHook = hook;\n }\n\n static setPostResponseHook(hook: PostResponseHook | null): void {\n APIRequest.postResponseHook = hook;\n }\n\n header(key: string, value: string): this {\n this.options.headers[key] = value;\n return this;\n }\n\n query(key: string, value: string): this;\n query(params: QueryParams): this;\n query(keyOrParams: string | QueryParams, value?: string): this {\n if (typeof keyOrParams === 'string') this.options.query[keyOrParams] = String(value);\n else {\n for (const [k, v] of Object.entries(keyOrParams)) {\n if (v !== undefined) this.options.query[k] = String(v);\n }\n }\n return this;\n }\n\n field(key: string, value: JsonValue): this {\n if (!this.options.data) this.options.data = {};\n\n const keys = key.split('.');\n let pointer = this.options.data;\n for (let index = 0; index < keys.length - 1; index++) {\n const currentKey = keys[index] as string;\n if (!pointer[currentKey]) pointer[currentKey] = {};\n pointer = pointer[currentKey] as JsonObject;\n }\n pointer[keys[keys.length - 1] as string] = value;\n\n return this;\n }\n\n body(data: JsonObject): this {\n this.options.data = data;\n return this;\n }\n\n async execute<T>(): Promise<T> {\n const { path, method, headers, query, data } = this.options;\n\n const queryString = Object.keys(query).length > 0 ? `?${new URLSearchParams(query).toString()}` : '';\n const url = path.startsWith('http://') || path.startsWith('https://') ? `${path}${queryString}` : `${APIRequest.baseUrl}${path}${queryString}`;\n\n const init: RequestInit = { method, headers };\n if (data) {\n headers['content-type'] = 'application/json';\n init.body = JSON.stringify(data);\n }\n\n let response: Response;\n try {\n const options = { ...this.options };\n if (APIRequest.preRequestHook) await APIRequest.preRequestHook({ url, init, options });\n response = await fetch(url, init);\n if (APIRequest.postResponseHook) await APIRequest.postResponseHook({ response, options });\n } catch {\n throw new ApiError(-1, { code: 'NETWORK_ERROR', type: 'NetworkError', message: 'Unable to reach the server' });\n }\n\n if (!response.ok) {\n let body: ErrorResponse;\n try {\n body = await response.json();\n } catch {\n throw new ApiError(response.status, { code: 'UNKNOWN_ERROR', type: 'UnknownError', message: `Request failed with status ${response.status}` });\n }\n throw new ApiError(response.status, body);\n }\n\n if (response.status === 204) return undefined as T;\n return response.json();\n }\n\n // biome-ignore lint/suspicious/noThenProperty: This class is designed to be thenable for convenient usage in async contexts\n then<T, TResult1 = T, TResult2 = never>(\n resolve?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n reject?: ((reason?: unknown) => TResult2 | PromiseLike<TResult2>) | null,\n ): Promise<TResult1 | TResult2> {\n return this.execute<T>().then(resolve, reject);\n }\n\n catch<T, TResult = never>(reject?: ((reason?: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult> {\n return this.execute<T>().catch(reject);\n }\n\n finally(callback: VoidFn): Promise<unknown> {\n return this.execute().finally(callback);\n }\n}\n"],"names":[],"mappings":";;AA4CO,MAAM,UAAA,CAAW;AAAA,EACtB,OAAe,OAAA,GAAU,SAAA;AAAA,EACzB,OAAe,cAAA,GAAwC,IAAA;AAAA,EACvD,OAAe,gBAAA,GAA4C,IAAA;AAAA,EAE1C,OAAA;AAAA,EAET,WAAA,CAAY,MAAc,MAAA,EAAgB;AAChD,IAAA,IAAA,CAAK,OAAA,GAAU,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAS,EAAC,EAAG,KAAA,EAAO,EAAC,EAAE;AAAA,EACxD;AAAA,EAEA,OAAO,IAAI,IAAA,EAA0B;AACnC,IAAA,OAAO,IAA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