@exyconn/common 2.3.2 → 2.3.3
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/README.md +117 -12
- package/dist/client/http/index.d.mts +217 -49
- package/dist/client/http/index.d.ts +217 -49
- package/dist/client/http/index.js +473 -94
- package/dist/client/http/index.js.map +1 -1
- package/dist/client/http/index.mjs +441 -84
- package/dist/client/http/index.mjs.map +1 -1
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +481 -319
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +449 -290
- package/dist/client/index.mjs.map +1 -1
- package/dist/client/utils/index.d.mts +3 -279
- package/dist/client/utils/index.d.ts +3 -279
- package/dist/{index-DuxL84IW.d.mts → index-BZf42T3R.d.mts} +39 -39
- package/dist/{index-D9a9oxQy.d.ts → index-CF0D8PGE.d.ts} +39 -39
- package/dist/{index-D3yCCjBZ.d.mts → index-Ckhm_HaX.d.mts} +21 -2
- package/dist/{index-01hoqibP.d.ts → index-br6POSyA.d.ts} +21 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1122 -329
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1134 -341
- package/dist/index.mjs.map +1 -1
- package/dist/packageCheck-B_qfsD6R.d.ts +280 -0
- package/dist/packageCheck-C2_FT_Rl.d.mts +280 -0
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +631 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +625 -2
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/middleware/index.d.mts +283 -2
- package/dist/server/middleware/index.d.ts +283 -2
- package/dist/server/middleware/index.js +761 -0
- package/dist/server/middleware/index.js.map +1 -1
- package/dist/server/middleware/index.mjs +751 -1
- package/dist/server/middleware/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -29,108 +29,465 @@ function _interopNamespace(e) {
|
|
|
29
29
|
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
|
30
30
|
var Yup__namespace = /*#__PURE__*/_interopNamespace(Yup);
|
|
31
31
|
|
|
32
|
-
// src/client/http/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
headers: {
|
|
47
|
-
"Content-Type": "application/json"
|
|
32
|
+
// src/client/http/http.ts
|
|
33
|
+
|
|
34
|
+
// src/client/http/logger.ts
|
|
35
|
+
var Logger = class {
|
|
36
|
+
constructor() {
|
|
37
|
+
this.isDevelopment = typeof window !== "undefined" && window.location.hostname === "localhost";
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Log informational messages
|
|
41
|
+
*/
|
|
42
|
+
info(message, data, options) {
|
|
43
|
+
if (this.isDevelopment) {
|
|
44
|
+
const prefix = options?.context ? `[${options.context}]` : "";
|
|
45
|
+
console.log(`${prefix} ${message}`, data ?? "");
|
|
48
46
|
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Log warning messages
|
|
50
|
+
*/
|
|
51
|
+
warn(message, data, options) {
|
|
52
|
+
if (this.isDevelopment) {
|
|
53
|
+
const prefix = options?.context ? `[${options.context}]` : "";
|
|
54
|
+
console.warn(`${prefix} ${message}`, data ?? "");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Log error messages
|
|
59
|
+
*/
|
|
60
|
+
error(message, error, options) {
|
|
61
|
+
const prefix = options?.context ? `[${options.context}]` : "";
|
|
62
|
+
if (this.isDevelopment) {
|
|
63
|
+
console.error(`${prefix} ${message}`, error, options?.metadata || "");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Log debug messages (only in development)
|
|
68
|
+
*/
|
|
69
|
+
debug(message, data, options) {
|
|
70
|
+
if (this.isDevelopment) {
|
|
71
|
+
const prefix = options?.context ? `[${options.context}]` : "";
|
|
72
|
+
console.debug(`${prefix} ${message}`, data || "");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Log API errors with structured information
|
|
77
|
+
*/
|
|
78
|
+
apiError(endpoint, error, metadata) {
|
|
79
|
+
this.error(`API Error: ${endpoint}`, error, {
|
|
80
|
+
context: "API",
|
|
81
|
+
metadata: {
|
|
82
|
+
endpoint,
|
|
83
|
+
...metadata
|
|
57
84
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var logger = new Logger();
|
|
89
|
+
|
|
90
|
+
// src/client/http/response-parser.ts
|
|
91
|
+
var STATUS_CODES = {
|
|
92
|
+
SUCCESS: 200,
|
|
93
|
+
CREATED: 201,
|
|
94
|
+
NO_CONTENT: 204,
|
|
95
|
+
BAD_REQUEST: 400,
|
|
96
|
+
UNAUTHORIZED: 401,
|
|
97
|
+
FORBIDDEN: 403,
|
|
98
|
+
NOT_FOUND: 404,
|
|
99
|
+
CONFLICT: 409,
|
|
100
|
+
ERROR: 500
|
|
101
|
+
};
|
|
102
|
+
var STATUS_MESSAGES = {
|
|
103
|
+
SUCCESS: "success",
|
|
104
|
+
CREATED: "created",
|
|
105
|
+
NO_CONTENT: "no_content",
|
|
106
|
+
BAD_REQUEST: "bad_request",
|
|
107
|
+
UNAUTHORIZED: "unauthorized",
|
|
108
|
+
FORBIDDEN: "forbidden",
|
|
109
|
+
NOT_FOUND: "not_found",
|
|
110
|
+
CONFLICT: "conflict",
|
|
111
|
+
ERROR: "error"
|
|
112
|
+
};
|
|
113
|
+
var SUCCESS_CODES = [200, 201, 204];
|
|
114
|
+
var ERROR_CODES = [400, 401, 403, 404, 409, 500];
|
|
115
|
+
var parseResponseData = (response, fallback = null) => {
|
|
116
|
+
try {
|
|
117
|
+
if (!response || typeof response !== "object") {
|
|
118
|
+
return fallback;
|
|
119
|
+
}
|
|
120
|
+
const resp = response;
|
|
121
|
+
if ("data" in resp) {
|
|
122
|
+
return resp["data"] ?? fallback;
|
|
123
|
+
}
|
|
124
|
+
return response;
|
|
125
|
+
} catch (error) {
|
|
126
|
+
logger.error("Error parsing response data", error);
|
|
127
|
+
return fallback;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
var parseResponseMessage = (response, fallback = "") => {
|
|
131
|
+
try {
|
|
132
|
+
if (!response || typeof response !== "object") {
|
|
133
|
+
return fallback;
|
|
134
|
+
}
|
|
135
|
+
const resp = response;
|
|
136
|
+
if ("message" in resp && typeof resp["message"] === "string") {
|
|
137
|
+
return resp["message"];
|
|
138
|
+
}
|
|
139
|
+
return fallback;
|
|
140
|
+
} catch (error) {
|
|
141
|
+
logger.error("Error parsing response message", error);
|
|
142
|
+
return fallback;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
var parseResponseStatus = (response) => {
|
|
146
|
+
try {
|
|
147
|
+
if (!response || typeof response !== "object") {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
const resp = response;
|
|
151
|
+
if ("statusCode" in resp && typeof resp["statusCode"] === "number") {
|
|
152
|
+
return resp["statusCode"];
|
|
153
|
+
}
|
|
154
|
+
if ("status" in resp && typeof resp["status"] === "number") {
|
|
155
|
+
return resp["status"];
|
|
156
|
+
}
|
|
157
|
+
return null;
|
|
158
|
+
} catch (error) {
|
|
159
|
+
logger.error("Error parsing response status", error);
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
var parseResponseStatusMessage = (response, fallback = "") => {
|
|
164
|
+
try {
|
|
165
|
+
if (!response || typeof response !== "object") {
|
|
166
|
+
return fallback;
|
|
167
|
+
}
|
|
168
|
+
const resp = response;
|
|
169
|
+
if ("status" in resp && typeof resp["status"] === "string") {
|
|
170
|
+
return resp["status"];
|
|
171
|
+
}
|
|
172
|
+
return fallback;
|
|
173
|
+
} catch (error) {
|
|
174
|
+
logger.error("Error parsing response status message", error);
|
|
175
|
+
return fallback;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
var isSuccessResponse = (response) => {
|
|
179
|
+
try {
|
|
180
|
+
const statusCode = parseResponseStatus(response);
|
|
181
|
+
if (statusCode !== null) {
|
|
182
|
+
return SUCCESS_CODES.includes(statusCode);
|
|
183
|
+
}
|
|
184
|
+
const status = parseResponseStatusMessage(response);
|
|
185
|
+
return [STATUS_MESSAGES.SUCCESS, STATUS_MESSAGES.CREATED, STATUS_MESSAGES.NO_CONTENT].includes(
|
|
186
|
+
status
|
|
187
|
+
);
|
|
188
|
+
} catch (error) {
|
|
189
|
+
logger.error("Error checking response success", error);
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
var isErrorResponse = (response) => {
|
|
194
|
+
try {
|
|
195
|
+
const statusCode = parseResponseStatus(response);
|
|
196
|
+
if (statusCode !== null) {
|
|
197
|
+
return ERROR_CODES.includes(statusCode);
|
|
198
|
+
}
|
|
199
|
+
return false;
|
|
200
|
+
} catch (error) {
|
|
201
|
+
logger.error("Error checking response error", error);
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
var parsePaginatedResponse = (response) => {
|
|
206
|
+
try {
|
|
207
|
+
if (!response || typeof response !== "object") {
|
|
208
|
+
return { items: [], total: 0, page: 1, limit: 10 };
|
|
209
|
+
}
|
|
210
|
+
const resp = response;
|
|
211
|
+
let items = [];
|
|
212
|
+
if ("data" in resp && Array.isArray(resp["data"])) {
|
|
213
|
+
items = resp["data"];
|
|
214
|
+
}
|
|
215
|
+
let total = items.length;
|
|
216
|
+
let page = 1;
|
|
217
|
+
let limit = 10;
|
|
218
|
+
let totalPages;
|
|
219
|
+
if ("paginationData" in resp && resp["paginationData"] && typeof resp["paginationData"] === "object") {
|
|
220
|
+
const paginationData = resp["paginationData"];
|
|
221
|
+
if ("total" in paginationData && typeof paginationData["total"] === "number") {
|
|
222
|
+
total = paginationData["total"];
|
|
223
|
+
}
|
|
224
|
+
if ("page" in paginationData && typeof paginationData["page"] === "number") {
|
|
225
|
+
page = paginationData["page"];
|
|
226
|
+
}
|
|
227
|
+
if ("limit" in paginationData && typeof paginationData["limit"] === "number") {
|
|
228
|
+
limit = paginationData["limit"];
|
|
229
|
+
}
|
|
230
|
+
if ("totalPages" in paginationData && typeof paginationData["totalPages"] === "number") {
|
|
231
|
+
totalPages = paginationData["totalPages"];
|
|
73
232
|
}
|
|
74
|
-
return Promise.reject(error);
|
|
75
233
|
}
|
|
76
|
-
|
|
77
|
-
|
|
234
|
+
let columns;
|
|
235
|
+
if ("columns" in resp && Array.isArray(resp["columns"])) {
|
|
236
|
+
columns = resp["columns"];
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
items,
|
|
240
|
+
total,
|
|
241
|
+
page,
|
|
242
|
+
limit,
|
|
243
|
+
...totalPages !== void 0 && { totalPages },
|
|
244
|
+
...columns !== void 0 && { columns }
|
|
245
|
+
};
|
|
246
|
+
} catch (error) {
|
|
247
|
+
logger.error("Error parsing paginated response", error);
|
|
248
|
+
return { items: [], total: 0, page: 1, limit: 10 };
|
|
249
|
+
}
|
|
78
250
|
};
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
251
|
+
var extractNestedData = (response, path, fallback = null) => {
|
|
252
|
+
try {
|
|
253
|
+
const keys = path.split(".");
|
|
254
|
+
let current = response;
|
|
255
|
+
for (const key of keys) {
|
|
256
|
+
if (current && typeof current === "object" && key in current) {
|
|
257
|
+
current = current[key];
|
|
258
|
+
} else {
|
|
259
|
+
return fallback;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return current;
|
|
263
|
+
} catch (error) {
|
|
264
|
+
logger.error("Error extracting nested data", error);
|
|
265
|
+
return fallback;
|
|
82
266
|
}
|
|
83
|
-
}
|
|
84
|
-
var
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
// src/client/http/response-parser.ts
|
|
92
|
-
var parseResponse = (response) => {
|
|
93
|
-
if (response.data?.success && response.data?.data !== void 0) {
|
|
94
|
-
return response.data.data;
|
|
267
|
+
};
|
|
268
|
+
var safeJsonParse = (json, fallback = null) => {
|
|
269
|
+
try {
|
|
270
|
+
return JSON.parse(json);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
logger.error("Error parsing JSON", error);
|
|
273
|
+
return fallback;
|
|
95
274
|
}
|
|
96
|
-
return null;
|
|
97
275
|
};
|
|
98
|
-
var
|
|
99
|
-
|
|
276
|
+
var parseAxiosErrorMessage = (error) => {
|
|
277
|
+
try {
|
|
278
|
+
if (!error || typeof error !== "object") {
|
|
279
|
+
return "An unexpected error occurred";
|
|
280
|
+
}
|
|
281
|
+
const err = error;
|
|
282
|
+
if ("response" in err && err["response"] && typeof err["response"] === "object") {
|
|
283
|
+
const response = err["response"];
|
|
284
|
+
if ("data" in response && response["data"] && typeof response["data"] === "object") {
|
|
285
|
+
const data = response["data"];
|
|
286
|
+
if ("data" in data && data["data"] && typeof data["data"] === "object") {
|
|
287
|
+
const nestedData = data["data"];
|
|
288
|
+
if ("message" in nestedData && typeof nestedData["message"] === "string") {
|
|
289
|
+
return nestedData["message"];
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if ("message" in data && typeof data["message"] === "string") {
|
|
293
|
+
return data["message"];
|
|
294
|
+
}
|
|
295
|
+
if ("error" in data && typeof data["error"] === "string") {
|
|
296
|
+
return data["error"];
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if ("message" in err && typeof err["message"] === "string") {
|
|
301
|
+
return err["message"];
|
|
302
|
+
}
|
|
303
|
+
if (typeof error === "string") {
|
|
304
|
+
return error;
|
|
305
|
+
}
|
|
306
|
+
return "An unexpected error occurred";
|
|
307
|
+
} catch (parseError2) {
|
|
308
|
+
logger.error("Error parsing axios error message", parseError2);
|
|
309
|
+
return "An unexpected error occurred";
|
|
310
|
+
}
|
|
100
311
|
};
|
|
101
312
|
var parseError = (error) => {
|
|
102
|
-
|
|
103
|
-
|
|
313
|
+
try {
|
|
314
|
+
if (!error || typeof error !== "object") {
|
|
315
|
+
return {
|
|
316
|
+
message: "An unexpected error occurred",
|
|
317
|
+
statusCode: null,
|
|
318
|
+
data: null
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
const err = error;
|
|
322
|
+
let statusCode = null;
|
|
323
|
+
let data = null;
|
|
324
|
+
let status;
|
|
325
|
+
if ("response" in err && err["response"] && typeof err["response"] === "object") {
|
|
326
|
+
const response = err["response"];
|
|
327
|
+
if ("status" in response && typeof response["status"] === "number") {
|
|
328
|
+
statusCode = response["status"];
|
|
329
|
+
}
|
|
330
|
+
if ("data" in response && response["data"] !== void 0) {
|
|
331
|
+
data = response["data"];
|
|
332
|
+
if (data && typeof data === "object" && "status" in data) {
|
|
333
|
+
const dataObj = data;
|
|
334
|
+
if (typeof dataObj["status"] === "string") {
|
|
335
|
+
status = dataObj["status"];
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
if (statusCode === null && "statusCode" in err && typeof err["statusCode"] === "number") {
|
|
341
|
+
statusCode = err["statusCode"];
|
|
342
|
+
}
|
|
343
|
+
if (data === null && "data" in err && err["data"] !== void 0) {
|
|
344
|
+
data = err["data"];
|
|
345
|
+
}
|
|
346
|
+
if (!status && "status" in err && typeof err["status"] === "string") {
|
|
347
|
+
status = err["status"];
|
|
348
|
+
}
|
|
349
|
+
return {
|
|
350
|
+
message: parseAxiosErrorMessage(error),
|
|
351
|
+
statusCode,
|
|
352
|
+
data,
|
|
353
|
+
...status !== void 0 && { status }
|
|
354
|
+
};
|
|
355
|
+
} catch (err) {
|
|
356
|
+
logger.error("Error parsing error object", err);
|
|
357
|
+
return {
|
|
358
|
+
message: "An unexpected error occurred",
|
|
359
|
+
statusCode: null,
|
|
360
|
+
data: null
|
|
361
|
+
};
|
|
104
362
|
}
|
|
105
|
-
|
|
106
|
-
|
|
363
|
+
};
|
|
364
|
+
var simpleParseResponse = (response) => {
|
|
365
|
+
return response?.data?.data?.data;
|
|
366
|
+
};
|
|
367
|
+
var simpleMetaParseResponse = (response) => {
|
|
368
|
+
return response?.data?.data?.meta;
|
|
369
|
+
};
|
|
370
|
+
var simpleParseDualDataResponse = (response) => {
|
|
371
|
+
return response?.data?.data;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// src/client/http/http.ts
|
|
375
|
+
var isDevelopment = typeof window !== "undefined" && window.location.hostname === "localhost";
|
|
376
|
+
var API_BASE_URL = isDevelopment ? "http://localhost:4002" : "https://service-api.exyconn.com";
|
|
377
|
+
var API_PREFIX = "/v1/api";
|
|
378
|
+
var axiosInstance = axios__default.default.create({
|
|
379
|
+
baseURL: API_BASE_URL,
|
|
380
|
+
timeout: 3e4,
|
|
381
|
+
// 30 seconds
|
|
382
|
+
headers: {
|
|
383
|
+
"Content-Type": "application/json"
|
|
107
384
|
}
|
|
108
|
-
|
|
109
|
-
|
|
385
|
+
});
|
|
386
|
+
axiosInstance.interceptors.request.use(
|
|
387
|
+
(config) => {
|
|
388
|
+
try {
|
|
389
|
+
if (typeof window !== "undefined" && window.localStorage) {
|
|
390
|
+
const selectedOrg = localStorage.getItem("selectedOrganization");
|
|
391
|
+
if (selectedOrg) {
|
|
392
|
+
const org = JSON.parse(selectedOrg);
|
|
393
|
+
if (org && org._id) {
|
|
394
|
+
config.headers["x-organization-id"] = org._id;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
} catch (error) {
|
|
399
|
+
logger.warn("Failed to read organization from localStorage", error);
|
|
400
|
+
}
|
|
401
|
+
return config;
|
|
402
|
+
},
|
|
403
|
+
(error) => {
|
|
404
|
+
return Promise.reject(error);
|
|
110
405
|
}
|
|
111
|
-
|
|
112
|
-
|
|
406
|
+
);
|
|
407
|
+
axiosInstance.interceptors.response.use(
|
|
408
|
+
(response) => response,
|
|
409
|
+
(error) => {
|
|
410
|
+
const parsedError = parseError(error);
|
|
411
|
+
logger.error("API Error", parsedError);
|
|
412
|
+
return Promise.reject(parsedError);
|
|
113
413
|
}
|
|
114
|
-
|
|
414
|
+
);
|
|
415
|
+
var buildHeaders = (customHeaders) => {
|
|
416
|
+
const headers = {
|
|
417
|
+
"Content-Type": "application/json",
|
|
418
|
+
...customHeaders
|
|
419
|
+
};
|
|
420
|
+
return headers;
|
|
115
421
|
};
|
|
116
|
-
var
|
|
117
|
-
|
|
422
|
+
var buildConfig = (params, customHeaders) => {
|
|
423
|
+
const config = {
|
|
424
|
+
headers: buildHeaders(customHeaders)
|
|
425
|
+
};
|
|
426
|
+
if (params) {
|
|
427
|
+
config.params = params;
|
|
428
|
+
}
|
|
429
|
+
return config;
|
|
118
430
|
};
|
|
119
|
-
var
|
|
120
|
-
|
|
431
|
+
var getRequest = async (url, params, customHeaders) => {
|
|
432
|
+
const config = buildConfig(params, customHeaders);
|
|
433
|
+
return axiosInstance.get(url, config);
|
|
121
434
|
};
|
|
122
|
-
var
|
|
123
|
-
|
|
435
|
+
var postRequest = async (url, data, customHeaders) => {
|
|
436
|
+
const config = buildConfig(void 0, customHeaders);
|
|
437
|
+
return axiosInstance.post(url, data, config);
|
|
124
438
|
};
|
|
125
|
-
var
|
|
126
|
-
|
|
439
|
+
var putRequest = async (url, data, customHeaders) => {
|
|
440
|
+
const config = buildConfig(void 0, customHeaders);
|
|
441
|
+
return axiosInstance.put(url, data, config);
|
|
127
442
|
};
|
|
128
|
-
var
|
|
129
|
-
|
|
443
|
+
var patchRequest = async (url, data, customHeaders) => {
|
|
444
|
+
const config = buildConfig(void 0, customHeaders);
|
|
445
|
+
return axiosInstance.patch(url, data, config);
|
|
130
446
|
};
|
|
131
|
-
var
|
|
132
|
-
const
|
|
133
|
-
return
|
|
447
|
+
var deleteRequest = async (url, params, customHeaders) => {
|
|
448
|
+
const config = buildConfig(params, customHeaders);
|
|
449
|
+
return axiosInstance.delete(url, config);
|
|
450
|
+
};
|
|
451
|
+
var uploadFile = async (url, file, additionalData) => {
|
|
452
|
+
const formData = new FormData();
|
|
453
|
+
formData.append("file", file);
|
|
454
|
+
if (additionalData) {
|
|
455
|
+
Object.entries(additionalData).forEach(([key, value]) => {
|
|
456
|
+
formData.append(key, String(value));
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
const config = {
|
|
460
|
+
headers: {
|
|
461
|
+
"Content-Type": "multipart/form-data"
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
return axiosInstance.post(url, formData, config);
|
|
465
|
+
};
|
|
466
|
+
var extractData = (response) => {
|
|
467
|
+
return parseResponseData(response.data);
|
|
468
|
+
};
|
|
469
|
+
var extractMessage = (response) => {
|
|
470
|
+
return parseResponseMessage(response, "");
|
|
471
|
+
};
|
|
472
|
+
var isSuccess = (response) => {
|
|
473
|
+
return response.status >= 200 && response.status < 300;
|
|
474
|
+
};
|
|
475
|
+
var extractPaginatedData = (response) => {
|
|
476
|
+
return parsePaginatedResponse(response.data);
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
// src/client/http/slug.ts
|
|
480
|
+
var generateSlug = (text) => {
|
|
481
|
+
if (!text) return "";
|
|
482
|
+
return text.trim().replace(/[^\w\s]/g, "").replace(/\s+(.)/g, (_, char) => char.toUpperCase()).replace(/\s+/g, "").replace(/^(.)/, (_, char) => char.toLowerCase());
|
|
483
|
+
};
|
|
484
|
+
var generateUrlSlug = (text) => {
|
|
485
|
+
if (!text) return "";
|
|
486
|
+
return text.trim().toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
487
|
+
};
|
|
488
|
+
var generateSnakeSlug = (text) => {
|
|
489
|
+
if (!text) return "";
|
|
490
|
+
return text.trim().toLowerCase().replace(/[^\w\s]/g, "").replace(/\s+/g, "_").replace(/_+/g, "_").replace(/^_|_$/g, "");
|
|
134
491
|
};
|
|
135
492
|
|
|
136
493
|
// src/client/logger/client-logger.ts
|
|
@@ -286,40 +643,6 @@ var formatRelativeTime = (date) => {
|
|
|
286
643
|
}
|
|
287
644
|
return "just now";
|
|
288
645
|
};
|
|
289
|
-
var formatDateForInput = (date) => {
|
|
290
|
-
const dateObj = new Date(date);
|
|
291
|
-
return dateObj.toISOString().split("T")[0];
|
|
292
|
-
};
|
|
293
|
-
var formatDateTimeForInput = (date) => {
|
|
294
|
-
const dateObj = new Date(date);
|
|
295
|
-
return dateObj.toISOString().slice(0, 16);
|
|
296
|
-
};
|
|
297
|
-
var isToday = (date) => {
|
|
298
|
-
const dateObj = new Date(date);
|
|
299
|
-
const today = /* @__PURE__ */ new Date();
|
|
300
|
-
return dateObj.getDate() === today.getDate() && dateObj.getMonth() === today.getMonth() && dateObj.getFullYear() === today.getFullYear();
|
|
301
|
-
};
|
|
302
|
-
var isPast = (date) => {
|
|
303
|
-
return new Date(date).getTime() < Date.now();
|
|
304
|
-
};
|
|
305
|
-
var isFuture = (date) => {
|
|
306
|
-
return new Date(date).getTime() > Date.now();
|
|
307
|
-
};
|
|
308
|
-
var addDays = (date, days) => {
|
|
309
|
-
const dateObj = new Date(date);
|
|
310
|
-
dateObj.setDate(dateObj.getDate() + days);
|
|
311
|
-
return dateObj;
|
|
312
|
-
};
|
|
313
|
-
var startOfDay = (date) => {
|
|
314
|
-
const dateObj = new Date(date);
|
|
315
|
-
dateObj.setHours(0, 0, 0, 0);
|
|
316
|
-
return dateObj;
|
|
317
|
-
};
|
|
318
|
-
var endOfDay = (date) => {
|
|
319
|
-
const dateObj = new Date(date);
|
|
320
|
-
dateObj.setHours(23, 59, 59, 999);
|
|
321
|
-
return dateObj;
|
|
322
|
-
};
|
|
323
646
|
|
|
324
647
|
// src/client/utils/clipboard.ts
|
|
325
648
|
var copyToClipboard = async (text) => {
|
|
@@ -344,20 +667,6 @@ var copyToClipboard = async (text) => {
|
|
|
344
667
|
return false;
|
|
345
668
|
}
|
|
346
669
|
};
|
|
347
|
-
var readFromClipboard = async () => {
|
|
348
|
-
try {
|
|
349
|
-
if (navigator.clipboard && window.isSecureContext) {
|
|
350
|
-
return await navigator.clipboard.readText();
|
|
351
|
-
}
|
|
352
|
-
return null;
|
|
353
|
-
} catch (error) {
|
|
354
|
-
console.error("Failed to read from clipboard:", error);
|
|
355
|
-
return null;
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
var isClipboardAvailable = () => {
|
|
359
|
-
return !!(navigator.clipboard && window.isSecureContext);
|
|
360
|
-
};
|
|
361
670
|
|
|
362
671
|
// src/client/utils/slug.ts
|
|
363
672
|
var slugify = (text) => {
|
|
@@ -394,165 +703,15 @@ var kebabToCamel = (text) => {
|
|
|
394
703
|
return text.replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
395
704
|
};
|
|
396
705
|
|
|
397
|
-
// src/client/utils/events.ts
|
|
398
|
-
var EventEmitter = class {
|
|
399
|
-
constructor() {
|
|
400
|
-
this.handlers = /* @__PURE__ */ new Map();
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Subscribe to an event
|
|
404
|
-
* @returns Unsubscribe function
|
|
405
|
-
*/
|
|
406
|
-
on(event, handler) {
|
|
407
|
-
if (!this.handlers.has(event)) {
|
|
408
|
-
this.handlers.set(event, /* @__PURE__ */ new Set());
|
|
409
|
-
}
|
|
410
|
-
this.handlers.get(event).add(handler);
|
|
411
|
-
return () => this.off(event, handler);
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Subscribe to an event once
|
|
415
|
-
*/
|
|
416
|
-
once(event, handler) {
|
|
417
|
-
const wrappedHandler = (data) => {
|
|
418
|
-
this.off(event, wrappedHandler);
|
|
419
|
-
handler(data);
|
|
420
|
-
};
|
|
421
|
-
return this.on(event, wrappedHandler);
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Unsubscribe from an event
|
|
425
|
-
*/
|
|
426
|
-
off(event, handler) {
|
|
427
|
-
const eventHandlers = this.handlers.get(event);
|
|
428
|
-
if (eventHandlers) {
|
|
429
|
-
eventHandlers.delete(handler);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* Emit an event
|
|
434
|
-
*/
|
|
435
|
-
emit(event, data) {
|
|
436
|
-
const eventHandlers = this.handlers.get(event);
|
|
437
|
-
if (eventHandlers) {
|
|
438
|
-
eventHandlers.forEach((handler) => {
|
|
439
|
-
try {
|
|
440
|
-
handler(data);
|
|
441
|
-
} catch (error) {
|
|
442
|
-
console.error(`Error in event handler for "${String(event)}":`, error);
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* Remove all handlers for an event (or all events)
|
|
449
|
-
*/
|
|
450
|
-
removeAllListeners(event) {
|
|
451
|
-
if (event) {
|
|
452
|
-
this.handlers.delete(event);
|
|
453
|
-
} else {
|
|
454
|
-
this.handlers.clear();
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Get count of listeners for an event
|
|
459
|
-
*/
|
|
460
|
-
listenerCount(event) {
|
|
461
|
-
return this.handlers.get(event)?.size ?? 0;
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
var createEventEmitter = () => {
|
|
465
|
-
return new EventEmitter();
|
|
466
|
-
};
|
|
467
|
-
var appEvents = new EventEmitter();
|
|
468
|
-
|
|
469
|
-
// src/client/utils/api-urls.ts
|
|
470
|
-
var ApiUrlBuilder = class {
|
|
471
|
-
constructor(config) {
|
|
472
|
-
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
473
|
-
this.version = config.version || "";
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* Build full URL from path
|
|
477
|
-
*/
|
|
478
|
-
build(path) {
|
|
479
|
-
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
480
|
-
const versionPath = this.version ? `/${this.version}` : "";
|
|
481
|
-
return `${this.baseUrl}${versionPath}${normalizedPath}`;
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* Build URL with query parameters
|
|
485
|
-
*/
|
|
486
|
-
buildWithParams(path, params) {
|
|
487
|
-
const url = this.build(path);
|
|
488
|
-
const filteredParams = Object.entries(params).filter(([, value]) => value !== void 0).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`).join("&");
|
|
489
|
-
return filteredParams ? `${url}?${filteredParams}` : url;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Build URL with path parameters
|
|
493
|
-
*/
|
|
494
|
-
buildWithPathParams(template, params) {
|
|
495
|
-
let path = template;
|
|
496
|
-
Object.entries(params).forEach(([key, value]) => {
|
|
497
|
-
path = path.replace(`:${key}`, String(value));
|
|
498
|
-
path = path.replace(`{${key}}`, String(value));
|
|
499
|
-
});
|
|
500
|
-
return this.build(path);
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Get base URL
|
|
504
|
-
*/
|
|
505
|
-
getBaseUrl() {
|
|
506
|
-
return this.baseUrl;
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Set new base URL
|
|
510
|
-
*/
|
|
511
|
-
setBaseUrl(baseUrl) {
|
|
512
|
-
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
var createApiUrlBuilder = (config) => {
|
|
516
|
-
return new ApiUrlBuilder(config);
|
|
517
|
-
};
|
|
518
|
-
var createApiEndpoints = (builder) => ({
|
|
519
|
-
// Auth endpoints
|
|
520
|
-
auth: {
|
|
521
|
-
login: () => builder.build("/auth/login"),
|
|
522
|
-
register: () => builder.build("/auth/register"),
|
|
523
|
-
logout: () => builder.build("/auth/logout"),
|
|
524
|
-
refresh: () => builder.build("/auth/refresh"),
|
|
525
|
-
me: () => builder.build("/auth/me"),
|
|
526
|
-
forgotPassword: () => builder.build("/auth/forgot-password"),
|
|
527
|
-
resetPassword: () => builder.build("/auth/reset-password")
|
|
528
|
-
},
|
|
529
|
-
// User endpoints
|
|
530
|
-
users: {
|
|
531
|
-
list: () => builder.build("/users"),
|
|
532
|
-
get: (id) => builder.buildWithPathParams("/users/:id", { id }),
|
|
533
|
-
create: () => builder.build("/users"),
|
|
534
|
-
update: (id) => builder.buildWithPathParams("/users/:id", { id }),
|
|
535
|
-
delete: (id) => builder.buildWithPathParams("/users/:id", { id })
|
|
536
|
-
},
|
|
537
|
-
// Generic CRUD factory
|
|
538
|
-
crud: (resource) => ({
|
|
539
|
-
list: () => builder.build(`/${resource}`),
|
|
540
|
-
get: (id) => builder.buildWithPathParams(`/${resource}/:id`, { id }),
|
|
541
|
-
create: () => builder.build(`/${resource}`),
|
|
542
|
-
update: (id) => builder.buildWithPathParams(`/${resource}/:id`, { id }),
|
|
543
|
-
delete: (id) => builder.buildWithPathParams(`/${resource}/:id`, { id })
|
|
544
|
-
})
|
|
545
|
-
});
|
|
546
|
-
|
|
547
706
|
// src/client/utils/response-parser.ts
|
|
548
|
-
var
|
|
707
|
+
var isSuccessResponse2 = (response) => {
|
|
549
708
|
return response.success === true;
|
|
550
709
|
};
|
|
551
|
-
var
|
|
710
|
+
var isErrorResponse2 = (response) => {
|
|
552
711
|
return response.success === false;
|
|
553
712
|
};
|
|
554
713
|
var getResponseData = (response, defaultValue) => {
|
|
555
|
-
if (
|
|
714
|
+
if (isSuccessResponse2(response) && response.data !== void 0) {
|
|
556
715
|
return response.data;
|
|
557
716
|
}
|
|
558
717
|
return defaultValue;
|
|
@@ -2793,18 +2952,18 @@ function useLogger(componentName, props, options = {}) {
|
|
|
2793
2952
|
const {
|
|
2794
2953
|
logProps = true,
|
|
2795
2954
|
logLifecycle = true,
|
|
2796
|
-
logger = console.log
|
|
2955
|
+
logger: logger2 = console.log
|
|
2797
2956
|
} = options;
|
|
2798
2957
|
const previousProps = react.useRef(props);
|
|
2799
2958
|
const renderCount = react.useRef(0);
|
|
2800
2959
|
renderCount.current++;
|
|
2801
2960
|
react.useEffect(() => {
|
|
2802
2961
|
if (logLifecycle) {
|
|
2803
|
-
|
|
2962
|
+
logger2(`[${componentName}] Mounted`);
|
|
2804
2963
|
}
|
|
2805
2964
|
return () => {
|
|
2806
2965
|
if (logLifecycle) {
|
|
2807
|
-
|
|
2966
|
+
logger2(`[${componentName}] Unmounted (rendered ${renderCount.current} times)`);
|
|
2808
2967
|
}
|
|
2809
2968
|
};
|
|
2810
2969
|
}, []);
|
|
@@ -2836,12 +2995,12 @@ function useLogger(componentName, props, options = {}) {
|
|
|
2836
2995
|
});
|
|
2837
2996
|
}
|
|
2838
2997
|
if (hasChanges) {
|
|
2839
|
-
|
|
2998
|
+
logger2(`[${componentName}] Props changed:`, changedProps);
|
|
2840
2999
|
}
|
|
2841
3000
|
previousProps.current = props;
|
|
2842
|
-
}, [componentName, props, logProps,
|
|
3001
|
+
}, [componentName, props, logProps, logger2]);
|
|
2843
3002
|
if (process.env.NODE_ENV === "development") {
|
|
2844
|
-
|
|
3003
|
+
logger2(`[${componentName}] Render #${renderCount.current}`);
|
|
2845
3004
|
}
|
|
2846
3005
|
}
|
|
2847
3006
|
var useLogger_default = useLogger;
|
|
@@ -5628,34 +5787,32 @@ function RegisterForm({
|
|
|
5628
5787
|
) });
|
|
5629
5788
|
}
|
|
5630
5789
|
|
|
5631
|
-
exports.
|
|
5790
|
+
exports.API_BASE_URL = API_BASE_URL;
|
|
5791
|
+
exports.API_PREFIX = API_PREFIX;
|
|
5632
5792
|
exports.ClientLogger = ClientLogger;
|
|
5633
5793
|
exports.ContactForm = ContactForm;
|
|
5634
|
-
exports.
|
|
5794
|
+
exports.ERROR_CODES = ERROR_CODES;
|
|
5635
5795
|
exports.LoginForm = LoginForm;
|
|
5636
5796
|
exports.NewsletterForm = NewsletterForm;
|
|
5637
5797
|
exports.RegisterForm = RegisterForm;
|
|
5798
|
+
exports.STATUS_CODES = STATUS_CODES;
|
|
5799
|
+
exports.STATUS_MESSAGES = STATUS_MESSAGES;
|
|
5800
|
+
exports.SUCCESS_CODES = SUCCESS_CODES;
|
|
5638
5801
|
exports.ThemeContext = ThemeContext;
|
|
5639
5802
|
exports.ThemeProvider = ThemeProvider;
|
|
5640
5803
|
exports.ThemeToggle = ThemeToggle;
|
|
5641
5804
|
exports.VALIDATION_MESSAGES = VALIDATION_MESSAGES;
|
|
5642
|
-
exports.addDays = addDays;
|
|
5643
5805
|
exports.adjustColor = adjustColor;
|
|
5644
|
-
exports.
|
|
5806
|
+
exports.axios = axiosInstance;
|
|
5645
5807
|
exports.camelToKebab = camelToKebab;
|
|
5646
5808
|
exports.capitalize = capitalize;
|
|
5647
5809
|
exports.capitalizeWords = capitalizeWords;
|
|
5648
|
-
exports.checkPackage = checkPackage;
|
|
5649
5810
|
exports.clientLogger = clientLogger;
|
|
5650
5811
|
exports.contactFormSchema = contactFormSchema;
|
|
5651
5812
|
exports.copyToClipboard = copyToClipboard;
|
|
5652
|
-
exports.createApiEndpoints = createApiEndpoints;
|
|
5653
|
-
exports.createApiUrlBuilder = createApiUrlBuilder;
|
|
5654
5813
|
exports.createClientLogger = createClientLogger;
|
|
5655
5814
|
exports.createEmptyPaginationMeta = createEmptyPaginationMeta;
|
|
5656
5815
|
exports.createErrorResponse = createErrorResponse;
|
|
5657
|
-
exports.createEventEmitter = createEventEmitter;
|
|
5658
|
-
exports.createHttpClient = createHttpClient;
|
|
5659
5816
|
exports.createRegisterFormSchema = createRegisterFormSchema;
|
|
5660
5817
|
exports.createSuccessResponse = createSuccessResponse;
|
|
5661
5818
|
exports.createTheme = createTheme;
|
|
@@ -5664,6 +5821,7 @@ exports.cssVar = cssVar;
|
|
|
5664
5821
|
exports.deepMerge = deepMerge;
|
|
5665
5822
|
exports.defaultDarkTheme = defaultDarkTheme;
|
|
5666
5823
|
exports.defaultLightTheme = defaultLightTheme;
|
|
5824
|
+
exports.deleteRequest = deleteRequest;
|
|
5667
5825
|
exports.dummyBannerData = dummyBannerData;
|
|
5668
5826
|
exports.dummyFaqItems = dummyFaqItems;
|
|
5669
5827
|
exports.dummyFeatures = dummyFeatures;
|
|
@@ -5672,59 +5830,66 @@ exports.dummyHeaderData = dummyHeaderData;
|
|
|
5672
5830
|
exports.dummyImage = dummyImage;
|
|
5673
5831
|
exports.dummyPricingPlans = dummyPricingPlans;
|
|
5674
5832
|
exports.dummyTestimonials = dummyTestimonials;
|
|
5675
|
-
exports.
|
|
5833
|
+
exports.extractData = extractData;
|
|
5834
|
+
exports.extractMessage = extractMessage;
|
|
5835
|
+
exports.extractNestedData = extractNestedData;
|
|
5836
|
+
exports.extractPaginatedData = extractPaginatedData;
|
|
5676
5837
|
exports.flattenToCssVars = flattenToCssVars;
|
|
5677
5838
|
exports.formatDate = formatDate;
|
|
5678
|
-
exports.formatDateForInput = formatDateForInput;
|
|
5679
5839
|
exports.formatDateTime = formatDateTime;
|
|
5680
|
-
exports.formatDateTimeForInput = formatDateTimeForInput;
|
|
5681
|
-
exports.formatPackageCheckResult = formatPackageCheckResult;
|
|
5682
5840
|
exports.formatRelativeTime = formatRelativeTime;
|
|
5683
5841
|
exports.generateCssVars = generateCssVars;
|
|
5684
|
-
exports.
|
|
5842
|
+
exports.generateSlug = generateSlug;
|
|
5843
|
+
exports.generateSnakeSlug = generateSnakeSlug;
|
|
5844
|
+
exports.generateUrlSlug = generateUrlSlug;
|
|
5685
5845
|
exports.getContrastColor = getContrastColor;
|
|
5686
5846
|
exports.getErrorMessage = getErrorMessage;
|
|
5687
5847
|
exports.getNextPage = getNextPage;
|
|
5688
5848
|
exports.getPrevPage = getPrevPage;
|
|
5849
|
+
exports.getRequest = getRequest;
|
|
5689
5850
|
exports.getResponseData = getResponseData;
|
|
5690
5851
|
exports.getSystemColorScheme = getSystemColorScheme;
|
|
5691
5852
|
exports.hasData = hasData;
|
|
5692
5853
|
exports.hasMorePages = hasMorePages;
|
|
5693
5854
|
exports.hexToRgba = hexToRgba;
|
|
5694
5855
|
exports.injectCssVars = injectCssVars;
|
|
5695
|
-
exports.isClipboardAvailable = isClipboardAvailable;
|
|
5696
5856
|
exports.isErrorResponse = isErrorResponse;
|
|
5697
|
-
exports.isForbidden = isForbidden;
|
|
5698
|
-
exports.isFuture = isFuture;
|
|
5699
|
-
exports.isNotFound = isNotFound;
|
|
5700
|
-
exports.isPast = isPast;
|
|
5701
|
-
exports.isServerError = isServerError;
|
|
5702
|
-
exports.isStatusError = isStatusError;
|
|
5703
5857
|
exports.isSuccess = isSuccess;
|
|
5704
5858
|
exports.isSuccessResponse = isSuccessResponse;
|
|
5705
|
-
exports.
|
|
5706
|
-
exports.
|
|
5859
|
+
exports.isUtilErrorResponse = isErrorResponse2;
|
|
5860
|
+
exports.isUtilSuccessResponse = isSuccessResponse2;
|
|
5707
5861
|
exports.kebabToCamel = kebabToCamel;
|
|
5708
5862
|
exports.loadThemeFromUrl = loadThemeFromUrl;
|
|
5709
5863
|
exports.loadThemeMode = loadThemeMode;
|
|
5864
|
+
exports.logger = logger;
|
|
5710
5865
|
exports.loginFormSchema = loginFormSchema;
|
|
5711
5866
|
exports.loremIpsum = loremIpsum;
|
|
5712
5867
|
exports.newsletterFormSchema = newsletterFormSchema;
|
|
5713
5868
|
exports.packageCheck = packageCheck;
|
|
5869
|
+
exports.parseAxiosErrorMessage = parseAxiosErrorMessage;
|
|
5714
5870
|
exports.parseError = parseError;
|
|
5715
|
-
exports.
|
|
5716
|
-
exports.
|
|
5717
|
-
exports.
|
|
5871
|
+
exports.parsePaginatedResponse = parsePaginatedResponse;
|
|
5872
|
+
exports.parseResponseData = parseResponseData;
|
|
5873
|
+
exports.parseResponseMessage = parseResponseMessage;
|
|
5874
|
+
exports.parseResponseStatus = parseResponseStatus;
|
|
5875
|
+
exports.parseResponseStatusMessage = parseResponseStatusMessage;
|
|
5876
|
+
exports.patchRequest = patchRequest;
|
|
5877
|
+
exports.postRequest = postRequest;
|
|
5878
|
+
exports.putRequest = putRequest;
|
|
5718
5879
|
exports.registerFormSchema = registerFormSchema;
|
|
5719
5880
|
exports.removeCssVars = removeCssVars;
|
|
5720
5881
|
exports.resolveThemeMode = resolveThemeMode;
|
|
5882
|
+
exports.safeJsonParse = safeJsonParse;
|
|
5721
5883
|
exports.saveThemeMode = saveThemeMode;
|
|
5884
|
+
exports.simpleMetaParseResponse = simpleMetaParseResponse;
|
|
5885
|
+
exports.simpleParseDualDataResponse = simpleParseDualDataResponse;
|
|
5886
|
+
exports.simpleParseResponse = simpleParseResponse;
|
|
5722
5887
|
exports.slugify = slugify;
|
|
5723
5888
|
exports.slugifyUnique = slugifyUnique;
|
|
5724
|
-
exports.startOfDay = startOfDay;
|
|
5725
5889
|
exports.truncate = truncate;
|
|
5726
5890
|
exports.truncateWords = truncateWords;
|
|
5727
5891
|
exports.unslugify = unslugify;
|
|
5892
|
+
exports.uploadFile = uploadFile;
|
|
5728
5893
|
exports.useBattery = useBattery_default;
|
|
5729
5894
|
exports.useClickAway = useClickAway_default;
|
|
5730
5895
|
exports.useContinuousRetry = useContinuousRetry_default;
|
|
@@ -5785,8 +5950,5 @@ exports.useToggle = useToggle_default;
|
|
|
5785
5950
|
exports.useVisibilityChange = useVisibilityChange_default;
|
|
5786
5951
|
exports.useWindowScroll = useWindowScroll_default;
|
|
5787
5952
|
exports.useWindowSize = useWindowSize_default;
|
|
5788
|
-
exports.withAbortSignal = withAbortSignal;
|
|
5789
|
-
exports.withFormData = withFormData;
|
|
5790
|
-
exports.withTimeout = withTimeout;
|
|
5791
5953
|
//# sourceMappingURL=index.js.map
|
|
5792
5954
|
//# sourceMappingURL=index.js.map
|