@putkoff/abstract-utilities 0.1.122 → 0.1.124

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.
Files changed (73) hide show
  1. package/dist/cjs/index.d.ts +0 -1
  2. package/dist/cjs/index.js +46 -62
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/esm/index.d.ts +0 -1
  5. package/dist/esm/index.js +47 -62
  6. package/dist/esm/index.js.map +1 -1
  7. package/dist/index.d.ts +1 -3
  8. package/package.json +1 -1
  9. package/dist/functions/auth_utils/imports.js +0 -1
  10. package/dist/functions/auth_utils/index.js +0 -1
  11. package/dist/functions/auth_utils/src/index.js +0 -1
  12. package/dist/functions/auth_utils/src/token_utils.js +0 -95
  13. package/dist/functions/config_utils/imports.js +0 -1
  14. package/dist/functions/config_utils/index.js +0 -1
  15. package/dist/functions/config_utils/src/config_utils.js +0 -33
  16. package/dist/functions/config_utils/src/index.js +0 -1
  17. package/dist/functions/constants_utils/index.js +0 -1
  18. package/dist/functions/constants_utils/src/constants.js +0 -7
  19. package/dist/functions/constants_utils/src/index.js +0 -1
  20. package/dist/functions/env_utils/imports.js +0 -1
  21. package/dist/functions/env_utils/index.js +0 -1
  22. package/dist/functions/env_utils/src/index.js +0 -1
  23. package/dist/functions/env_utils/src/window_utils.js +0 -47
  24. package/dist/functions/fetch_utils/imports.js +0 -7
  25. package/dist/functions/fetch_utils/index.js +0 -1
  26. package/dist/functions/fetch_utils/src/fetchIt_utils.js +0 -116
  27. package/dist/functions/fetch_utils/src/index.js +0 -1
  28. package/dist/functions/fetch_utils/src/utils.js +0 -171
  29. package/dist/functions/index.js +0 -12
  30. package/dist/functions/path_utils/imports.js +0 -26
  31. package/dist/functions/path_utils/index.js +0 -1
  32. package/dist/functions/path_utils/src/base_dirs.js +0 -17
  33. package/dist/functions/path_utils/src/function_dirs.js +0 -42
  34. package/dist/functions/path_utils/src/index.js +0 -6
  35. package/dist/functions/path_utils/src/misc_dirs.js +0 -15
  36. package/dist/functions/path_utils/src/path_utils.js +0 -75
  37. package/dist/functions/path_utils/src/paths.js +0 -12
  38. package/dist/functions/path_utils/src/src_dirs.js +0 -25
  39. package/dist/functions/read_utils/imports.js +0 -1
  40. package/dist/functions/read_utils/index.js +0 -1
  41. package/dist/functions/read_utils/src/index.js +0 -1
  42. package/dist/functions/read_utils/src/read_utils.js +0 -55
  43. package/dist/functions/rndm_utils/imports.js +0 -1
  44. package/dist/functions/rndm_utils/index.js +0 -1
  45. package/dist/functions/rndm_utils/src/index.js +0 -1
  46. package/dist/functions/rndm_utils/src/utils.js +0 -12
  47. package/dist/functions/string_utils/index.js +0 -1
  48. package/dist/functions/string_utils/src/index.js +0 -1
  49. package/dist/functions/string_utils/src/string_utils.js +0 -113
  50. package/dist/functions/type_utils/imports.js +0 -1
  51. package/dist/functions/type_utils/index.js +0 -1
  52. package/dist/functions/type_utils/src/index.js +0 -1
  53. package/dist/functions/type_utils/src/type_utils.js +0 -4
  54. package/dist/functions/ui_utils/imports.js +0 -5
  55. package/dist/functions/ui_utils/index.js +0 -1
  56. package/dist/functions/ui_utils/src/button.js +0 -32
  57. package/dist/functions/ui_utils/src/checkbox.js +0 -16
  58. package/dist/functions/ui_utils/src/index.js +0 -4
  59. package/dist/functions/ui_utils/src/input.js +0 -16
  60. package/dist/functions/ui_utils/src/spinner.js +0 -4
  61. package/dist/index.js +0 -5
  62. package/dist/types/index.js +0 -1
  63. package/dist/types/src/ChangePassword.js +0 -1
  64. package/dist/types/src/Files.js +0 -1
  65. package/dist/types/src/index.js +0 -5
  66. package/dist/types/src/login.js +0 -1
  67. package/dist/types/src/logout.js +0 -1
  68. package/dist/types/src/utils.js +0 -1
  69. package/dist/utils/imports.js +0 -1
  70. package/dist/utils/index.js +0 -1
  71. package/dist/utils/src/Input.js +0 -2
  72. package/dist/utils/src/config.js +0 -20
  73. package/dist/utils/src/index.js +0 -2
package/dist/esm/index.js CHANGED
@@ -1,50 +1,6 @@
1
1
  export { useCallback, useEffect, useRef, useState } from 'react';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
 
4
- /******************************************************************************
5
- Copyright (c) Microsoft Corporation.
6
-
7
- Permission to use, copy, modify, and/or distribute this software for any
8
- purpose with or without fee is hereby granted.
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- PERFORMANCE OF THIS SOFTWARE.
17
- ***************************************************************************** */
18
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
19
-
20
-
21
- function __rest(s, e) {
22
- var t = {};
23
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
- t[p] = s[p];
25
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
- t[p[i]] = s[p[i]];
29
- }
30
- return t;
31
- }
32
-
33
- function __awaiter(thisArg, _arguments, P, generator) {
34
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
35
- return new (P || (P = Promise))(function (resolve, reject) {
36
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
37
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
38
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
39
- step((generator = generator.apply(thisArg, _arguments || [])).next());
40
- });
41
- }
42
-
43
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
44
- var e = new Error(message);
45
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
46
- };
47
-
48
4
  /**
49
5
  ***Changes**:
50
6
  *- Updated import path for `InputProps` to `../../types/interfaces`.
@@ -196,6 +152,50 @@ function get_window_parts() {
196
152
  return null;
197
153
  }
198
154
 
155
+ /******************************************************************************
156
+ Copyright (c) Microsoft Corporation.
157
+
158
+ Permission to use, copy, modify, and/or distribute this software for any
159
+ purpose with or without fee is hereby granted.
160
+
161
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
162
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
163
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
164
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
165
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
166
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
167
+ PERFORMANCE OF THIS SOFTWARE.
168
+ ***************************************************************************** */
169
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
170
+
171
+
172
+ function __rest(s, e) {
173
+ var t = {};
174
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
175
+ t[p] = s[p];
176
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
177
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
178
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
179
+ t[p[i]] = s[p[i]];
180
+ }
181
+ return t;
182
+ }
183
+
184
+ function __awaiter(thisArg, _arguments, P, generator) {
185
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
186
+ return new (P || (P = Promise))(function (resolve, reject) {
187
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
188
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
189
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
190
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
191
+ });
192
+ }
193
+
194
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
195
+ var e = new Error(message);
196
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
197
+ };
198
+
199
199
  function assertPath(path) {
200
200
  if (typeof path !== 'string') {
201
201
  throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));
@@ -1014,7 +1014,7 @@ function alertit(obj = null) {
1014
1014
  }
1015
1015
 
1016
1016
  let _cachedConfig = null;
1017
- function loadConfig$1() {
1017
+ function loadConfig() {
1018
1018
  return __awaiter(this, arguments, void 0, function* (filePath = null) {
1019
1019
  // 1. If nobody passed a custom path, we default to "config.json" (relative)
1020
1020
  const relativePath = filePath || 'config.json';
@@ -1033,7 +1033,7 @@ function loadConfig$1() {
1033
1033
  }
1034
1034
  function getConfig(key) {
1035
1035
  return __awaiter(this, void 0, void 0, function* () {
1036
- const cfg = yield loadConfig$1();
1036
+ const cfg = yield loadConfig();
1037
1037
  return key ? cfg[key] : cfg;
1038
1038
  });
1039
1039
  }
@@ -1341,20 +1341,5 @@ function readJsonFile(relativeOrAbsolutePath) {
1341
1341
  });
1342
1342
  }
1343
1343
 
1344
- function loadConfig() {
1345
- return __awaiter(this, void 0, void 0, function* () {
1346
- const base = (process.env.BASE_API_URL || "").replace(/\/+$/, "");
1347
- const url = `${base}/config.json`;
1348
- const res = yield fetch(url);
1349
- if (!res.ok)
1350
- throw new Error(`Failed to load ${url}: ${res.status}`);
1351
- yield res.json();
1352
- });
1353
- }
1354
-
1355
- (() => __awaiter(void 0, void 0, void 0, function* () {
1356
- console.log(yield get_app_config_url('api'));
1357
- }))(); // ← note the () here to invoke it
1358
-
1359
- export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensure_list, fetchIt, fetchSharePatch, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getComponentsUtilsDirectory, getConfig, getDbConfigsPath, getDistDir, getEnvDir, getEnvPath, getFunctionsDir, getFunctionsUtilsDirectory, getHooksUtilsDirectory, getLibUtilsDirectory, getPublicDir, getSchemasDirPath, getSchemasPath, getSrcDir, getSubstring, getToken, get_app_config_url, get_basename, get_dirname, get_extname, get_filename, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, isLoggedIn, isTokenExpired, loadConfig, make_path, make_sanitized_path, normalizeUrl, readFileContents, readJsonFile, requestPatch, requireToken, sanitizeFilename, secureFetchIt, stripPrefixes, truncateString };
1344
+ export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensure_list, fetchIt, fetchSharePatch, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getComponentsUtilsDirectory, getConfig, getDbConfigsPath, getDistDir, getEnvDir, getEnvPath, getFunctionsDir, getFunctionsUtilsDirectory, getHooksUtilsDirectory, getLibUtilsDirectory, getPublicDir, getSchemasDirPath, getSchemasPath, getSrcDir, getSubstring, getToken, get_app_config_url, get_basename, get_dirname, get_extname, get_filename, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, isLoggedIn, isTokenExpired, make_path, make_sanitized_path, normalizeUrl, readFileContents, readJsonFile, requestPatch, requireToken, sanitizeFilename, secureFetchIt, stripPrefixes, truncateString };
1360
1345
  //# sourceMappingURL=index.js.map