@putkoff/abstract-utilities 0.1.161 → 0.1.162

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 (126) hide show
  1. package/dist/index.d.ts +0 -205
  2. package/package.json +17 -10
  3. package/dist/cjs/functions/auth_utils/imports.d.ts +0 -1
  4. package/dist/cjs/functions/auth_utils/index.d.ts +0 -1
  5. package/dist/cjs/functions/auth_utils/src/index.d.ts +0 -1
  6. package/dist/cjs/functions/auth_utils/src/token_utils.d.ts +0 -28
  7. package/dist/cjs/functions/config_utils/imports.d.ts +0 -1
  8. package/dist/cjs/functions/config_utils/index.d.ts +0 -1
  9. package/dist/cjs/functions/config_utils/src/config_utils.d.ts +0 -8
  10. package/dist/cjs/functions/config_utils/src/index.d.ts +0 -1
  11. package/dist/cjs/functions/constants_utils/index.d.ts +0 -1
  12. package/dist/cjs/functions/constants_utils/src/constants.d.ts +0 -7
  13. package/dist/cjs/functions/constants_utils/src/index.d.ts +0 -1
  14. package/dist/cjs/functions/env_utils/imports.d.ts +0 -1
  15. package/dist/cjs/functions/env_utils/index.d.ts +0 -1
  16. package/dist/cjs/functions/env_utils/src/index.d.ts +0 -1
  17. package/dist/cjs/functions/env_utils/src/window_utils.d.ts +0 -4
  18. package/dist/cjs/functions/fetch_utils/imports.d.ts +0 -7
  19. package/dist/cjs/functions/fetch_utils/index.d.ts +0 -1
  20. package/dist/cjs/functions/fetch_utils/src/fetchIt_utils.d.ts +0 -10
  21. package/dist/cjs/functions/fetch_utils/src/index.d.ts +0 -2
  22. package/dist/cjs/functions/fetch_utils/src/utils.d.ts +0 -24
  23. package/dist/cjs/functions/index.d.ts +0 -12
  24. package/dist/cjs/functions/path_utils/imports.d.ts +0 -21
  25. package/dist/cjs/functions/path_utils/index.d.ts +0 -1
  26. package/dist/cjs/functions/path_utils/src/base_dirs.d.ts +0 -4
  27. package/dist/cjs/functions/path_utils/src/function_dirs.d.ts +0 -10
  28. package/dist/cjs/functions/path_utils/src/index.d.ts +0 -6
  29. package/dist/cjs/functions/path_utils/src/misc_dirs.d.ts +0 -4
  30. package/dist/cjs/functions/path_utils/src/path_utils.d.ts +0 -17
  31. package/dist/cjs/functions/path_utils/src/paths.d.ts +0 -5
  32. package/dist/cjs/functions/path_utils/src/src_dirs.d.ts +0 -6
  33. package/dist/cjs/functions/read_utils/index.d.ts +0 -1
  34. package/dist/cjs/functions/read_utils/src/index.d.ts +0 -1
  35. package/dist/cjs/functions/read_utils/src/read_utils.d.ts +0 -9
  36. package/dist/cjs/functions/rndm_utils/index.d.ts +0 -1
  37. package/dist/cjs/functions/rndm_utils/src/index.d.ts +0 -1
  38. package/dist/cjs/functions/rndm_utils/src/utils.d.ts +0 -1
  39. package/dist/cjs/functions/string_utils/index.d.ts +0 -1
  40. package/dist/cjs/functions/string_utils/src/index.d.ts +0 -1
  41. package/dist/cjs/functions/string_utils/src/string_utils.d.ts +0 -31
  42. package/dist/cjs/functions/type_utils/index.d.ts +0 -1
  43. package/dist/cjs/functions/type_utils/src/index.d.ts +0 -1
  44. package/dist/cjs/functions/type_utils/src/type_utils.d.ts +0 -1
  45. package/dist/cjs/functions/ui_utils/imports.d.ts +0 -4
  46. package/dist/cjs/functions/ui_utils/index.d.ts +0 -1
  47. package/dist/cjs/functions/ui_utils/src/button.d.ts +0 -5
  48. package/dist/cjs/functions/ui_utils/src/checkbox.d.ts +0 -4
  49. package/dist/cjs/functions/ui_utils/src/index.d.ts +0 -4
  50. package/dist/cjs/functions/ui_utils/src/input.d.ts +0 -5
  51. package/dist/cjs/functions/ui_utils/src/spinner.d.ts +0 -1
  52. package/dist/cjs/index.d.ts +0 -2
  53. package/dist/cjs/types/index.d.ts +0 -1
  54. package/dist/cjs/types/src/ChangePassword.d.ts +0 -16
  55. package/dist/cjs/types/src/Files.d.ts +0 -27
  56. package/dist/cjs/types/src/index.d.ts +0 -5
  57. package/dist/cjs/types/src/login.d.ts +0 -12
  58. package/dist/cjs/types/src/logout.d.ts +0 -4
  59. package/dist/cjs/types/src/utils.d.ts +0 -38
  60. package/dist/cjs/utils/imports.d.ts +0 -1
  61. package/dist/cjs/utils/index.d.ts +0 -1
  62. package/dist/cjs/utils/src/Input.d.ts +0 -17
  63. package/dist/cjs/utils/src/config.d.ts +0 -5
  64. package/dist/cjs/utils/src/index.d.ts +0 -2
  65. package/dist/esm/functions/auth_utils/imports.d.ts +0 -1
  66. package/dist/esm/functions/auth_utils/index.d.ts +0 -1
  67. package/dist/esm/functions/auth_utils/src/index.d.ts +0 -1
  68. package/dist/esm/functions/auth_utils/src/token_utils.d.ts +0 -28
  69. package/dist/esm/functions/config_utils/imports.d.ts +0 -1
  70. package/dist/esm/functions/config_utils/index.d.ts +0 -1
  71. package/dist/esm/functions/config_utils/src/config_utils.d.ts +0 -8
  72. package/dist/esm/functions/config_utils/src/index.d.ts +0 -1
  73. package/dist/esm/functions/constants_utils/index.d.ts +0 -1
  74. package/dist/esm/functions/constants_utils/src/constants.d.ts +0 -7
  75. package/dist/esm/functions/constants_utils/src/index.d.ts +0 -1
  76. package/dist/esm/functions/env_utils/imports.d.ts +0 -1
  77. package/dist/esm/functions/env_utils/index.d.ts +0 -1
  78. package/dist/esm/functions/env_utils/src/index.d.ts +0 -1
  79. package/dist/esm/functions/env_utils/src/window_utils.d.ts +0 -4
  80. package/dist/esm/functions/fetch_utils/imports.d.ts +0 -7
  81. package/dist/esm/functions/fetch_utils/index.d.ts +0 -1
  82. package/dist/esm/functions/fetch_utils/src/fetchIt_utils.d.ts +0 -10
  83. package/dist/esm/functions/fetch_utils/src/index.d.ts +0 -2
  84. package/dist/esm/functions/fetch_utils/src/utils.d.ts +0 -24
  85. package/dist/esm/functions/index.d.ts +0 -12
  86. package/dist/esm/functions/path_utils/imports.d.ts +0 -21
  87. package/dist/esm/functions/path_utils/index.d.ts +0 -1
  88. package/dist/esm/functions/path_utils/src/base_dirs.d.ts +0 -4
  89. package/dist/esm/functions/path_utils/src/function_dirs.d.ts +0 -10
  90. package/dist/esm/functions/path_utils/src/index.d.ts +0 -6
  91. package/dist/esm/functions/path_utils/src/misc_dirs.d.ts +0 -4
  92. package/dist/esm/functions/path_utils/src/path_utils.d.ts +0 -17
  93. package/dist/esm/functions/path_utils/src/paths.d.ts +0 -5
  94. package/dist/esm/functions/path_utils/src/src_dirs.d.ts +0 -6
  95. package/dist/esm/functions/read_utils/index.d.ts +0 -1
  96. package/dist/esm/functions/read_utils/src/index.d.ts +0 -1
  97. package/dist/esm/functions/read_utils/src/read_utils.d.ts +0 -9
  98. package/dist/esm/functions/rndm_utils/index.d.ts +0 -1
  99. package/dist/esm/functions/rndm_utils/src/index.d.ts +0 -1
  100. package/dist/esm/functions/rndm_utils/src/utils.d.ts +0 -1
  101. package/dist/esm/functions/string_utils/index.d.ts +0 -1
  102. package/dist/esm/functions/string_utils/src/index.d.ts +0 -1
  103. package/dist/esm/functions/string_utils/src/string_utils.d.ts +0 -31
  104. package/dist/esm/functions/type_utils/index.d.ts +0 -1
  105. package/dist/esm/functions/type_utils/src/index.d.ts +0 -1
  106. package/dist/esm/functions/type_utils/src/type_utils.d.ts +0 -1
  107. package/dist/esm/functions/ui_utils/imports.d.ts +0 -4
  108. package/dist/esm/functions/ui_utils/index.d.ts +0 -1
  109. package/dist/esm/functions/ui_utils/src/button.d.ts +0 -5
  110. package/dist/esm/functions/ui_utils/src/checkbox.d.ts +0 -4
  111. package/dist/esm/functions/ui_utils/src/index.d.ts +0 -4
  112. package/dist/esm/functions/ui_utils/src/input.d.ts +0 -5
  113. package/dist/esm/functions/ui_utils/src/spinner.d.ts +0 -1
  114. package/dist/esm/index.d.ts +0 -2
  115. package/dist/esm/types/index.d.ts +0 -1
  116. package/dist/esm/types/src/ChangePassword.d.ts +0 -16
  117. package/dist/esm/types/src/Files.d.ts +0 -27
  118. package/dist/esm/types/src/index.d.ts +0 -5
  119. package/dist/esm/types/src/login.d.ts +0 -12
  120. package/dist/esm/types/src/logout.d.ts +0 -4
  121. package/dist/esm/types/src/utils.d.ts +0 -38
  122. package/dist/esm/utils/imports.d.ts +0 -1
  123. package/dist/esm/utils/index.d.ts +0 -1
  124. package/dist/esm/utils/src/Input.d.ts +0 -17
  125. package/dist/esm/utils/src/config.d.ts +0 -5
  126. package/dist/esm/utils/src/index.d.ts +0 -2
@@ -1 +0,0 @@
1
- export declare function Spinner(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './functions';
2
- export * from './types';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,16 +0,0 @@
1
- export interface ChangePasswordProps {
2
- onSuccess?: () => void;
3
- onCancel?: () => void;
4
- }
5
- export interface ChangePasswordFormProps {
6
- username: string;
7
- setUsername: (value: string) => void;
8
- currentPwd: string;
9
- setCurrentPwd: (value: string) => void;
10
- newPwd: string;
11
- setNewPwd: (value: string) => void;
12
- busy: boolean;
13
- msg: string | null;
14
- onSubmit: (e: React.FormEvent) => void;
15
- onCancel?: () => void;
16
- }
@@ -1,27 +0,0 @@
1
- export interface FileItem {
2
- id: number | string;
3
- filename: string;
4
- uploader_id: string;
5
- filepath: string;
6
- created_at: string;
7
- download_count: number;
8
- download_limit: number | null;
9
- shareable: boolean;
10
- needsPassword: boolean;
11
- share_password: string | null;
12
- }
13
- export interface ApiRow {
14
- id: number | string;
15
- filename: string;
16
- uploader_id: string;
17
- filepath: string;
18
- created_at: string;
19
- download_count: number;
20
- download_limit: number | null;
21
- shareable: boolean;
22
- needsPassword: boolean;
23
- share_password: string;
24
- }
25
- export interface FileListResponse {
26
- files?: ApiRow[];
27
- }
@@ -1,5 +0,0 @@
1
- export * from './Files';
2
- export * from './ChangePassword';
3
- export * from './utils';
4
- export * from './logout';
5
- export * from './login';
@@ -1,12 +0,0 @@
1
- export interface LoginProps {
2
- onSuccess?: () => void;
3
- }
4
- export interface LoginFormProps {
5
- username: string;
6
- setUsername: (value: string) => void;
7
- password: string;
8
- setPassword: (value: string) => void;
9
- error: string | null;
10
- busy: boolean;
11
- onSubmit: (e: React.FormEvent) => void;
12
- }
@@ -1,4 +0,0 @@
1
- export interface LogoutButtonProps {
2
- /** Fired after the user is fully logged out so you can redirect to /login */
3
- onLoggedOut?: () => void;
4
- }
@@ -1,38 +0,0 @@
1
- export interface AppConfig {
2
- BASE_API_URL: string;
3
- BASE_OTHER_URL: string;
4
- FEATURE_FLAG?: boolean;
5
- SOME_NUMBER?: number;
6
- }
7
- export interface Promise<AppConfig> {
8
- BASE_URL: string;
9
- BASE_API_URL: string;
10
- FEATURE_FLAG?: boolean;
11
- SOME_NUMBER?: number;
12
- }
13
- export interface InputProps {
14
- label?: any;
15
- type?: any;
16
- value?: any;
17
- onChange?: any;
18
- disabled?: any;
19
- placeholder?: any;
20
- error?: string;
21
- }
22
- export type UrlKey = Extract<keyof AppConfig, `BASE_${string}_URL`>;
23
- export interface FetchVariables {
24
- method: string;
25
- headers: Record<string, string>;
26
- body?: string | FormData;
27
- }
28
- /**
29
- * Helpers for dealing with the JWT stored in localStorage.
30
- */
31
- export interface JwtPayload {
32
- /** UNIX-epoch seconds (standard exp claim) */
33
- exp: number;
34
- /** Your backend also stores the username here */
35
- username?: string;
36
- /** Any other claims are allowed */
37
- [key: string]: unknown;
38
- }
@@ -1 +0,0 @@
1
- export type { InputProps } from "./../types";
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,17 +0,0 @@
1
- export interface InputProps {
2
- label?: any;
3
- type?: any;
4
- value?: any;
5
- onValueChange?: any;
6
- disabled?: any;
7
- placeholder?: any;
8
- error?: string;
9
- }
10
- export interface FileInputExtra {
11
- directory?: boolean;
12
- multiple?: boolean;
13
- accept?: string;
14
- }
15
- /** keep other InputProps fields … */
16
- export type EnhancedInputProps = InputProps & FileInputExtra;
17
- export declare const Input: React.FC<EnhancedInputProps>;
@@ -1,5 +0,0 @@
1
- export interface AppConfig {
2
- API_BASE_URL: string;
3
- }
4
- export declare let AppConfig: AppConfig;
5
- export declare function loadConfig(): Promise<void>;
@@ -1,2 +0,0 @@
1
- export * from "./Input";
2
- export * from './config';
@@ -1 +0,0 @@
1
- export type { JwtPayload } from './../../types';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from "./token_utils";
@@ -1,28 +0,0 @@
1
- /**
2
- * Helpers for dealing with the JWT stored in localStorage.
3
- */
4
- import { JwtPayload } from './../imports';
5
- /**
6
- ***Changes**:
7
- *- Updated import path for `InputProps` to `../../types/interfaces`.
8
- *
9
- *3. **Token Utilities** (`src/functions/auth/token_utils.ts`):
10
- * Copy from `/var/www/abstractendeavors/my-login-app/src/functions/auth_utils/token_utils.ts`.
11
- *
12
- */
13
- export declare function isLoggedIn(): boolean;
14
- /** Read raw JWT from LocalStorage (or null if absent) */
15
- export declare function getToken(): string | null;
16
- /**
17
- * Add a Bearer Authorization header.
18
- * A shallow copy of headers is returned so callers can keep chaining.
19
- */
20
- export declare function getAuthorizationHeader(headers?: Record<string, string> | null, token?: string | null): Record<string, string>;
21
- /** Throw + redirect if there’s no valid token; otherwise return it. */
22
- export declare function requireToken(): string;
23
- /** True if token is structurally bad or its exp ≤ now. */
24
- export declare function isTokenExpired(token: string): boolean;
25
- /** Convenience wrapper: return username from the JWT (or null). */
26
- export declare function currentUsername(): string | null;
27
- export declare function currentUsernames(): any;
28
- export declare function decodeJwt(token: string): JwtPayload;
@@ -1 +0,0 @@
1
- export type { AppConfig } from './../../types';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,8 +0,0 @@
1
- import type { AppConfig } from './../imports';
2
- export declare function loadConfig(filePath?: string | null): Promise<AppConfig>;
3
- /**
4
- * getConfig(): load the full AppConfig
5
- * getConfig(key): load just that key
6
- */
7
- export declare function getConfig(): Promise<AppConfig>;
8
- export declare function getConfig<K extends keyof AppConfig>(key: K): Promise<AppConfig[K]>;
@@ -1 +0,0 @@
1
- export * from './config_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,7 +0,0 @@
1
- export declare const PROTOCOL = "https://";
2
- export declare const DOMAIN_NAME = "abstractendeavors";
3
- export declare const BASE_URL = "https://abstractendeavors.com";
4
- export declare const SUB_DIR = "secure-files";
5
- export declare const PROD_PREFIX = "/secure-files/";
6
- export declare const API_PREFIX = "/secure-files/api";
7
- export declare const DEV_PREFIX = "/secure-files-dev/";
@@ -1 +0,0 @@
1
- export * from './constants';
@@ -1 +0,0 @@
1
- export { BASE_URL, DEV_PREFIX } from './../constants_utils/index';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './window_utils';
@@ -1,4 +0,0 @@
1
- export declare function get_window(): (Window & typeof globalThis) | null;
2
- export declare function get_window_location(): Location | "https://abstractendeavors.com" | null;
3
- export declare function get_window_pathname(): string | null;
4
- export declare function get_window_parts(): Location | "https://abstractendeavors.com" | null;
@@ -1,7 +0,0 @@
1
- export { getAuthorizationHeader } from "./../auth_utils";
2
- export { make_path } from './../path_utils';
3
- export { alertit } from './../rndm_utils';
4
- export { ensure_list } from './../type_utils';
5
- export { eatInner, stripPrefixes } from './../string_utils';
6
- export type { LogoutButtonProps, FetchVariables, UrlKey } from './../../types';
7
- export { getConfig, loadConfig } from './../config_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,10 +0,0 @@
1
- /**
2
- * Given an “endpoint” slug like "api/list", build the full URL
3
- * from the BASE_API_URL entry in your JSON config.
4
- */
5
- export declare function get_app_config_url(endpoint: string): Promise<any>;
6
- export declare function fetchIt(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<any>;
7
- export declare function secureFetchIt<T>(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<T>;
8
- export declare function secureFetchIt(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<Blob>;
9
- export declare function requestPatch(url: string, body?: unknown): Promise<Response>;
10
- export declare function fetchSharePatch(file: unknown, appKey?: any): Promise<void>;
@@ -1,2 +0,0 @@
1
- export * from './fetchIt_utils';
2
- export * from './utils';
@@ -1,24 +0,0 @@
1
- import { FetchVariables } from './../imports';
2
- export declare function ensureAbstractUrl(endpoint: string, slices?: string[]): string;
3
- /**
4
- * Unwraps nested { result } fields until you hit a non-object or no more "result" keys.
5
- */
6
- export declare function getResult<T>(obj: unknown): T;
7
- export declare function api(endpoint: string): string;
8
- /**
9
- * Intercept 401/403 and force a clean redirect to login
10
- * without ever showing an alert.
11
- */
12
- export declare function checkResponse(res: Response): Response;
13
- /**
14
- * parseResult no longer needs to worry about JSON vs HTML redirect errors;
15
- * all 401/403 have already been handled above.
16
- */
17
- export declare function parseResult(res: Response): Promise<unknown>;
18
- export declare function getMethod(method?: string | null, body?: unknown): string;
19
- export declare function getHeaders(headers?: Record<string, string>, method?: string | null, body?: unknown): Record<string, string>;
20
- export declare function getBody(body?: unknown, method?: string | null): string | undefined;
21
- export declare function getFetchVars(headers?: Record<string, string> | null, method?: string | null, body?: any): FetchVariables;
22
- export declare function getHtmlDirectory(directory: string, filename: string): string;
23
- export declare function fetchIndexHtml(filename: string, directory?: string, base?: string): Promise<string>;
24
- export declare function fetchIndexHtmlContainer(filename: string, doc?: Document, directory?: string): Promise<void>;
@@ -1,12 +0,0 @@
1
- export { useCallback, useRef, useState, useEffect } from "react";
2
- export * from './auth_utils';
3
- export * from './constants_utils';
4
- export * from './env_utils';
5
- export * from './fetch_utils';
6
- export * from './path_utils';
7
- export * from './rndm_utils';
8
- export * from './string_utils';
9
- export * from './type_utils';
10
- export * from './ui_utils';
11
- export * from './config_utils';
12
- export * from './read_utils';
@@ -1,21 +0,0 @@
1
- /**
2
- * In the browser we already have a WHATWG URL constructor on window.
3
- * Here we re-export it as “url” so other modules can import it.
4
- */
5
- declare const _url: {
6
- new (url: string | URL, base?: string | URL): URL;
7
- prototype: URL;
8
- canParse(url: string | URL, base?: string | URL): boolean;
9
- createObjectURL(obj: Blob | MediaSource): string;
10
- parse(url: string | URL, base?: string | URL): URL | null;
11
- revokeObjectURL(url: string): void;
12
- } | undefined;
13
- export { _url as url };
14
- /**
15
- * Minimal fileURLToPath implementation for browser-side code.
16
- * If you only ever need to strip off “file://” in development, this is enough.
17
- */
18
- export declare function fileURLToPath(fileUrl: string): string;
19
- export { eatOuter, eatInner } from './../string_utils';
20
- export { ensure_list } from './../type_utils';
21
- export declare function getAbsolutePath(): string;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,4 +0,0 @@
1
- export declare function getBaseDir(): string;
2
- export declare function getPublicDir(): string;
3
- export declare function getDistDir(): string;
4
- export declare function getEnvDir(): string;
@@ -1,10 +0,0 @@
1
- export declare function getFunctionsDir(): string;
2
- export declare function geAuthsUtilsDirectory(): string;
3
- export declare function geBackupsUtilsDirectory(): string;
4
- export declare function geConstantsUtilsDirectory(): string;
5
- export declare function geEnvUtilsDirectory(): string;
6
- export declare function geFetchUtilsDirectory(): string;
7
- export declare function geFileUtilsDirectory(): string;
8
- export declare function gePathUtilsDirectory(): string;
9
- export declare function geStringUtilsDirectory(): string;
10
- export declare function geTypeUtilsDirectory(): string;
@@ -1,6 +0,0 @@
1
- export * from './path_utils';
2
- export * from './paths';
3
- export * from './function_dirs';
4
- export * from './src_dirs';
5
- export * from './base_dirs';
6
- export * from './misc_dirs';
@@ -1,4 +0,0 @@
1
- export declare function getEnvPath(string?: string): string;
2
- export declare function getDbConfigsPath(): string;
3
- export declare function getSchemasPath(): string;
4
- export declare function getSchemasDirPath(subPath: string): string;
@@ -1,17 +0,0 @@
1
- export declare function get_dirname(filePath: string | null): string;
2
- export declare function get_basename(filePath: string | null): string;
3
- export declare function get_filename(file_path: string): string;
4
- export declare function get_extname(filePath: string | null): string;
5
- export declare function get_splitext(filePath: string | null): {
6
- filename: string;
7
- extname: string;
8
- ext?: undefined;
9
- } | {
10
- filename: string;
11
- ext: string;
12
- extname?: undefined;
13
- };
14
- export declare function make_path(...segments: string[]): string;
15
- export declare function sanitizeFilename(filename: string): string;
16
- export declare function make_sanitized_path(...paths: string[]): string;
17
- export declare function normalizeUrl(base: string, p?: string): string;
@@ -1,5 +0,0 @@
1
- /**
2
- * Returns the absolute path of the current file.
3
- */
4
- export declare function getAbsDir(): string;
5
- export declare function getAbsPath(subPath: string): string;
@@ -1,6 +0,0 @@
1
- export declare function getSrcDir(): string;
2
- export declare function geStaticDirectory(): string;
3
- export declare function getLibUtilsDirectory(): string;
4
- export declare function getHooksUtilsDirectory(): string;
5
- export declare function getFunctionsUtilsDirectory(): string;
6
- export declare function getComponentsUtilsDirectory(): string;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './read_utils';
@@ -1,9 +0,0 @@
1
- /**
2
- * Reads a file at `relativeOrAbsolutePath` and returns its contents as a string.
3
- * In a browser this will reject immediately.
4
- */
5
- export declare function readFileContents(relativeOrAbsolutePath: string): Promise<string>;
6
- /**
7
- * Reads a JSON file and returns the parsed object.
8
- */
9
- export declare function readJsonFile<T = any>(relativeOrAbsolutePath: string): Promise<T>;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './utils';
@@ -1 +0,0 @@
1
- export declare function alertit(obj?: any): void;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './string_utils';
@@ -1,31 +0,0 @@
1
- export declare function getSubstring(obj: string, maxLength?: number | null, minLength?: number | null): string;
2
- export declare function truncateString(obj: string, maxLength?: number): string;
3
- export declare function stripPrefixes(str: string, bases?: string | string[]): string;
4
- /**
5
- * Removes characters from the beginning of the string
6
- * if they are found in the list of characters.
7
- *
8
- * @param str - The input string.
9
- * @param listObjects - A string or an array of characters to remove.
10
- * @returns The modified string.
11
- */
12
- export declare function eatInner(str: string, listObjects: string | string[]): string;
13
- /**
14
- * Removes characters from the end of the string
15
- * if they are found in the list of characters.
16
- *
17
- * @param str - The input string.
18
- * @param listObjects - A string or an array of characters to remove.
19
- * @returns The modified string.
20
- */
21
- export declare function eatOuter(str: string, listObjects: string | string[]): string;
22
- /**
23
- * Removes characters from both the beginning and the end of the string
24
- * if they are found in the list of characters.
25
- *
26
- * @param str - The input string.
27
- * @param listObjects - A string or an array of characters to remove.
28
- * @returns The modified string.
29
- */
30
- export declare function eatAll(str: string, listObjects: string | string[]): string;
31
- export declare function eatEnd(obj: string, endings?: string[]): string;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './type_utils';
@@ -1 +0,0 @@
1
- export declare function ensure_list<T>(obj: T | T[]): T[];
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const useState: typeof React.useState, useEffect: typeof React.useEffect, useCallback: typeof React.useCallback;
3
- export { fetchIt } from './../fetch_utils';
4
- export { currentUsername, isTokenExpired, getToken } from './../auth_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,5 +0,0 @@
1
- export declare function Button({ children, color, variant, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
2
- color?: 'gray' | 'green' | 'blue';
3
- variant?: 'default' | 'icon' | 'primary' | 'secondary';
4
- className?: string;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare function Checkbox({ label, ...rest }: React.InputHTMLAttributes<HTMLInputElement> & {
3
- label: string;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export * from './button';
2
- export * from './checkbox';
3
- export * from './input';
4
- export * from './spinner';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare function Input({ label, trailing, ...rest }: React.InputHTMLAttributes<HTMLInputElement> & {
3
- label: string;
4
- trailing?: React.ReactNode;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function Spinner(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './functions';
2
- export * from './types';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,16 +0,0 @@
1
- export interface ChangePasswordProps {
2
- onSuccess?: () => void;
3
- onCancel?: () => void;
4
- }
5
- export interface ChangePasswordFormProps {
6
- username: string;
7
- setUsername: (value: string) => void;
8
- currentPwd: string;
9
- setCurrentPwd: (value: string) => void;
10
- newPwd: string;
11
- setNewPwd: (value: string) => void;
12
- busy: boolean;
13
- msg: string | null;
14
- onSubmit: (e: React.FormEvent) => void;
15
- onCancel?: () => void;
16
- }
@@ -1,27 +0,0 @@
1
- export interface FileItem {
2
- id: number | string;
3
- filename: string;
4
- uploader_id: string;
5
- filepath: string;
6
- created_at: string;
7
- download_count: number;
8
- download_limit: number | null;
9
- shareable: boolean;
10
- needsPassword: boolean;
11
- share_password: string | null;
12
- }
13
- export interface ApiRow {
14
- id: number | string;
15
- filename: string;
16
- uploader_id: string;
17
- filepath: string;
18
- created_at: string;
19
- download_count: number;
20
- download_limit: number | null;
21
- shareable: boolean;
22
- needsPassword: boolean;
23
- share_password: string;
24
- }
25
- export interface FileListResponse {
26
- files?: ApiRow[];
27
- }
@@ -1,5 +0,0 @@
1
- export * from './Files';
2
- export * from './ChangePassword';
3
- export * from './utils';
4
- export * from './logout';
5
- export * from './login';
@@ -1,12 +0,0 @@
1
- export interface LoginProps {
2
- onSuccess?: () => void;
3
- }
4
- export interface LoginFormProps {
5
- username: string;
6
- setUsername: (value: string) => void;
7
- password: string;
8
- setPassword: (value: string) => void;
9
- error: string | null;
10
- busy: boolean;
11
- onSubmit: (e: React.FormEvent) => void;
12
- }
@@ -1,4 +0,0 @@
1
- export interface LogoutButtonProps {
2
- /** Fired after the user is fully logged out so you can redirect to /login */
3
- onLoggedOut?: () => void;
4
- }