jdev_helpers 1.4.5 → 1.4.7
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.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +41 -3
- package/dist/index.mjs +29 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,19 @@ import { HttpParams, HttpClient } from '@angular/common/http';
|
|
|
2
2
|
|
|
3
3
|
declare const debug: (message?: any, ...optionalParams: any[]) => void;
|
|
4
4
|
|
|
5
|
+
declare const REQUEST_PARAM_PAGE_NUMBER = "pageNumber";
|
|
6
|
+
declare const REQUEST_PARAM_QUERY = "query";
|
|
7
|
+
declare const REQUEST_PARAM_LIMIT = "limit";
|
|
8
|
+
declare const REQUEST_PARAM_NEXT_CURSOR = "nextCursor";
|
|
9
|
+
declare const REQUEST_PARAM_SIMILARITY = "similarity";
|
|
10
|
+
declare const REQUEST_PARAM_MATCH_SCORE = "matchScore";
|
|
11
|
+
declare const REQUEST_PARAM_LOCALE = "locale";
|
|
12
|
+
declare const RESPONSE_TYPE_JSON = "json";
|
|
13
|
+
declare const OBSERVE_RESPONSE = "response";
|
|
14
|
+
declare const OBSERVE_BODY = "body";
|
|
15
|
+
declare const HTTP_HEADER_CONTENT_TYPE = "content-type";
|
|
16
|
+
declare const MIME_TYPE_TEXT_PLAIN = "text/plain";
|
|
17
|
+
|
|
5
18
|
declare const WRITE_TO_LOCAL_STORAGE: (storageName: string, obj: any) => void;
|
|
6
19
|
declare const WRITE_TO_SESSION_STORAGE: (storageName: string, obj: any) => void;
|
|
7
20
|
declare const READ_FROM_LOCAL_STORAGE: (storageName: string) => any;
|
|
@@ -20,4 +33,4 @@ declare abstract class HttpParentService {
|
|
|
20
33
|
constructor();
|
|
21
34
|
}
|
|
22
35
|
|
|
23
|
-
export { type CustomHttpParam, HttpParentService, READ_FROM_LOCAL_STORAGE, READ_FROM_SESSION_STORAGE, WRITE_TO_LOCAL_STORAGE, WRITE_TO_SESSION_STORAGE, addHttpParams, createHttpParams, debug };
|
|
36
|
+
export { type CustomHttpParam, HTTP_HEADER_CONTENT_TYPE, HttpParentService, MIME_TYPE_TEXT_PLAIN, OBSERVE_BODY, OBSERVE_RESPONSE, READ_FROM_LOCAL_STORAGE, READ_FROM_SESSION_STORAGE, REQUEST_PARAM_LIMIT, REQUEST_PARAM_LOCALE, REQUEST_PARAM_MATCH_SCORE, REQUEST_PARAM_NEXT_CURSOR, REQUEST_PARAM_PAGE_NUMBER, REQUEST_PARAM_QUERY, REQUEST_PARAM_SIMILARITY, RESPONSE_TYPE_JSON, WRITE_TO_LOCAL_STORAGE, WRITE_TO_SESSION_STORAGE, addHttpParams, createHttpParams, debug };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,19 @@ import { HttpParams, HttpClient } from '@angular/common/http';
|
|
|
2
2
|
|
|
3
3
|
declare const debug: (message?: any, ...optionalParams: any[]) => void;
|
|
4
4
|
|
|
5
|
+
declare const REQUEST_PARAM_PAGE_NUMBER = "pageNumber";
|
|
6
|
+
declare const REQUEST_PARAM_QUERY = "query";
|
|
7
|
+
declare const REQUEST_PARAM_LIMIT = "limit";
|
|
8
|
+
declare const REQUEST_PARAM_NEXT_CURSOR = "nextCursor";
|
|
9
|
+
declare const REQUEST_PARAM_SIMILARITY = "similarity";
|
|
10
|
+
declare const REQUEST_PARAM_MATCH_SCORE = "matchScore";
|
|
11
|
+
declare const REQUEST_PARAM_LOCALE = "locale";
|
|
12
|
+
declare const RESPONSE_TYPE_JSON = "json";
|
|
13
|
+
declare const OBSERVE_RESPONSE = "response";
|
|
14
|
+
declare const OBSERVE_BODY = "body";
|
|
15
|
+
declare const HTTP_HEADER_CONTENT_TYPE = "content-type";
|
|
16
|
+
declare const MIME_TYPE_TEXT_PLAIN = "text/plain";
|
|
17
|
+
|
|
5
18
|
declare const WRITE_TO_LOCAL_STORAGE: (storageName: string, obj: any) => void;
|
|
6
19
|
declare const WRITE_TO_SESSION_STORAGE: (storageName: string, obj: any) => void;
|
|
7
20
|
declare const READ_FROM_LOCAL_STORAGE: (storageName: string) => any;
|
|
@@ -20,4 +33,4 @@ declare abstract class HttpParentService {
|
|
|
20
33
|
constructor();
|
|
21
34
|
}
|
|
22
35
|
|
|
23
|
-
export { type CustomHttpParam, HttpParentService, READ_FROM_LOCAL_STORAGE, READ_FROM_SESSION_STORAGE, WRITE_TO_LOCAL_STORAGE, WRITE_TO_SESSION_STORAGE, addHttpParams, createHttpParams, debug };
|
|
36
|
+
export { type CustomHttpParam, HTTP_HEADER_CONTENT_TYPE, HttpParentService, MIME_TYPE_TEXT_PLAIN, OBSERVE_BODY, OBSERVE_RESPONSE, READ_FROM_LOCAL_STORAGE, READ_FROM_SESSION_STORAGE, REQUEST_PARAM_LIMIT, REQUEST_PARAM_LOCALE, REQUEST_PARAM_MATCH_SCORE, REQUEST_PARAM_NEXT_CURSOR, REQUEST_PARAM_PAGE_NUMBER, REQUEST_PARAM_QUERY, REQUEST_PARAM_SIMILARITY, RESPONSE_TYPE_JSON, WRITE_TO_LOCAL_STORAGE, WRITE_TO_SESSION_STORAGE, addHttpParams, createHttpParams, debug };
|
package/dist/index.js
CHANGED
|
@@ -20,9 +20,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
HTTP_HEADER_CONTENT_TYPE: () => HTTP_HEADER_CONTENT_TYPE,
|
|
23
24
|
HttpParentService: () => HttpParentService,
|
|
25
|
+
MIME_TYPE_TEXT_PLAIN: () => MIME_TYPE_TEXT_PLAIN,
|
|
26
|
+
OBSERVE_BODY: () => OBSERVE_BODY,
|
|
27
|
+
OBSERVE_RESPONSE: () => OBSERVE_RESPONSE,
|
|
24
28
|
READ_FROM_LOCAL_STORAGE: () => READ_FROM_LOCAL_STORAGE,
|
|
25
29
|
READ_FROM_SESSION_STORAGE: () => READ_FROM_SESSION_STORAGE,
|
|
30
|
+
REQUEST_PARAM_LIMIT: () => REQUEST_PARAM_LIMIT,
|
|
31
|
+
REQUEST_PARAM_LOCALE: () => REQUEST_PARAM_LOCALE,
|
|
32
|
+
REQUEST_PARAM_MATCH_SCORE: () => REQUEST_PARAM_MATCH_SCORE,
|
|
33
|
+
REQUEST_PARAM_NEXT_CURSOR: () => REQUEST_PARAM_NEXT_CURSOR,
|
|
34
|
+
REQUEST_PARAM_PAGE_NUMBER: () => REQUEST_PARAM_PAGE_NUMBER,
|
|
35
|
+
REQUEST_PARAM_QUERY: () => REQUEST_PARAM_QUERY,
|
|
36
|
+
REQUEST_PARAM_SIMILARITY: () => REQUEST_PARAM_SIMILARITY,
|
|
37
|
+
RESPONSE_TYPE_JSON: () => RESPONSE_TYPE_JSON,
|
|
26
38
|
WRITE_TO_LOCAL_STORAGE: () => WRITE_TO_LOCAL_STORAGE,
|
|
27
39
|
WRITE_TO_SESSION_STORAGE: () => WRITE_TO_SESSION_STORAGE,
|
|
28
40
|
addHttpParams: () => addHttpParams,
|
|
@@ -31,12 +43,26 @@ __export(index_exports, {
|
|
|
31
43
|
});
|
|
32
44
|
module.exports = __toCommonJS(index_exports);
|
|
33
45
|
|
|
34
|
-
// src/js/common-
|
|
46
|
+
// src/js/common-helpers.ts
|
|
35
47
|
var debug = (message, ...optionalParams) => {
|
|
36
48
|
console.log(message, ...optionalParams);
|
|
37
49
|
};
|
|
38
50
|
|
|
39
|
-
// src/js/
|
|
51
|
+
// src/js/common-constants.ts
|
|
52
|
+
var REQUEST_PARAM_PAGE_NUMBER = "pageNumber";
|
|
53
|
+
var REQUEST_PARAM_QUERY = "query";
|
|
54
|
+
var REQUEST_PARAM_LIMIT = "limit";
|
|
55
|
+
var REQUEST_PARAM_NEXT_CURSOR = "nextCursor";
|
|
56
|
+
var REQUEST_PARAM_SIMILARITY = "similarity";
|
|
57
|
+
var REQUEST_PARAM_MATCH_SCORE = "matchScore";
|
|
58
|
+
var REQUEST_PARAM_LOCALE = "locale";
|
|
59
|
+
var RESPONSE_TYPE_JSON = "json";
|
|
60
|
+
var OBSERVE_RESPONSE = "response";
|
|
61
|
+
var OBSERVE_BODY = "body";
|
|
62
|
+
var HTTP_HEADER_CONTENT_TYPE = "content-type";
|
|
63
|
+
var MIME_TYPE_TEXT_PLAIN = "text/plain";
|
|
64
|
+
|
|
65
|
+
// src/js/storage-helpers.ts
|
|
40
66
|
var WRITE_TO_LOCAL_STORAGE = (storageName, obj) => {
|
|
41
67
|
writeToStorage(storageName, obj, true);
|
|
42
68
|
};
|
|
@@ -71,7 +97,7 @@ var writeToStorage = (storageName, obj, isLocalStorage) => {
|
|
|
71
97
|
}
|
|
72
98
|
};
|
|
73
99
|
|
|
74
|
-
// src/js/http-
|
|
100
|
+
// src/js/http-helpers.ts
|
|
75
101
|
var import_http = require("@angular/common/http");
|
|
76
102
|
function createHttpParams(customHttpParams) {
|
|
77
103
|
return addParamsToHttpParamsProcess(new import_http.HttpParams(), customHttpParams);
|
|
@@ -104,9 +130,21 @@ var HttpParentService = class {
|
|
|
104
130
|
};
|
|
105
131
|
// Annotate the CommonJS export names for ESM import in node:
|
|
106
132
|
0 && (module.exports = {
|
|
133
|
+
HTTP_HEADER_CONTENT_TYPE,
|
|
107
134
|
HttpParentService,
|
|
135
|
+
MIME_TYPE_TEXT_PLAIN,
|
|
136
|
+
OBSERVE_BODY,
|
|
137
|
+
OBSERVE_RESPONSE,
|
|
108
138
|
READ_FROM_LOCAL_STORAGE,
|
|
109
139
|
READ_FROM_SESSION_STORAGE,
|
|
140
|
+
REQUEST_PARAM_LIMIT,
|
|
141
|
+
REQUEST_PARAM_LOCALE,
|
|
142
|
+
REQUEST_PARAM_MATCH_SCORE,
|
|
143
|
+
REQUEST_PARAM_NEXT_CURSOR,
|
|
144
|
+
REQUEST_PARAM_PAGE_NUMBER,
|
|
145
|
+
REQUEST_PARAM_QUERY,
|
|
146
|
+
REQUEST_PARAM_SIMILARITY,
|
|
147
|
+
RESPONSE_TYPE_JSON,
|
|
110
148
|
WRITE_TO_LOCAL_STORAGE,
|
|
111
149
|
WRITE_TO_SESSION_STORAGE,
|
|
112
150
|
addHttpParams,
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
// src/js/common-
|
|
1
|
+
// src/js/common-helpers.ts
|
|
2
2
|
var debug = (message, ...optionalParams) => {
|
|
3
3
|
console.log(message, ...optionalParams);
|
|
4
4
|
};
|
|
5
5
|
|
|
6
|
-
// src/js/
|
|
6
|
+
// src/js/common-constants.ts
|
|
7
|
+
var REQUEST_PARAM_PAGE_NUMBER = "pageNumber";
|
|
8
|
+
var REQUEST_PARAM_QUERY = "query";
|
|
9
|
+
var REQUEST_PARAM_LIMIT = "limit";
|
|
10
|
+
var REQUEST_PARAM_NEXT_CURSOR = "nextCursor";
|
|
11
|
+
var REQUEST_PARAM_SIMILARITY = "similarity";
|
|
12
|
+
var REQUEST_PARAM_MATCH_SCORE = "matchScore";
|
|
13
|
+
var REQUEST_PARAM_LOCALE = "locale";
|
|
14
|
+
var RESPONSE_TYPE_JSON = "json";
|
|
15
|
+
var OBSERVE_RESPONSE = "response";
|
|
16
|
+
var OBSERVE_BODY = "body";
|
|
17
|
+
var HTTP_HEADER_CONTENT_TYPE = "content-type";
|
|
18
|
+
var MIME_TYPE_TEXT_PLAIN = "text/plain";
|
|
19
|
+
|
|
20
|
+
// src/js/storage-helpers.ts
|
|
7
21
|
var WRITE_TO_LOCAL_STORAGE = (storageName, obj) => {
|
|
8
22
|
writeToStorage(storageName, obj, true);
|
|
9
23
|
};
|
|
@@ -38,7 +52,7 @@ var writeToStorage = (storageName, obj, isLocalStorage) => {
|
|
|
38
52
|
}
|
|
39
53
|
};
|
|
40
54
|
|
|
41
|
-
// src/js/http-
|
|
55
|
+
// src/js/http-helpers.ts
|
|
42
56
|
import { HttpParams } from "@angular/common/http";
|
|
43
57
|
function createHttpParams(customHttpParams) {
|
|
44
58
|
return addParamsToHttpParamsProcess(new HttpParams(), customHttpParams);
|
|
@@ -70,9 +84,21 @@ var HttpParentService = class {
|
|
|
70
84
|
}
|
|
71
85
|
};
|
|
72
86
|
export {
|
|
87
|
+
HTTP_HEADER_CONTENT_TYPE,
|
|
73
88
|
HttpParentService,
|
|
89
|
+
MIME_TYPE_TEXT_PLAIN,
|
|
90
|
+
OBSERVE_BODY,
|
|
91
|
+
OBSERVE_RESPONSE,
|
|
74
92
|
READ_FROM_LOCAL_STORAGE,
|
|
75
93
|
READ_FROM_SESSION_STORAGE,
|
|
94
|
+
REQUEST_PARAM_LIMIT,
|
|
95
|
+
REQUEST_PARAM_LOCALE,
|
|
96
|
+
REQUEST_PARAM_MATCH_SCORE,
|
|
97
|
+
REQUEST_PARAM_NEXT_CURSOR,
|
|
98
|
+
REQUEST_PARAM_PAGE_NUMBER,
|
|
99
|
+
REQUEST_PARAM_QUERY,
|
|
100
|
+
REQUEST_PARAM_SIMILARITY,
|
|
101
|
+
RESPONSE_TYPE_JSON,
|
|
76
102
|
WRITE_TO_LOCAL_STORAGE,
|
|
77
103
|
WRITE_TO_SESSION_STORAGE,
|
|
78
104
|
addHttpParams,
|