@putkoff/abstract-utilities 0.1.110 → 0.1.112

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 (149) hide show
  1. package/dist/cjs/utils/src/Input.d.ts +17 -13
  2. package/dist/esm/utils/src/Input.d.ts +17 -13
  3. package/dist/utils/src/Input.d.ts +17 -13
  4. package/package.json +2 -1
  5. package/dist/cjs/config.d.ts +0 -5
  6. package/dist/cjs/file_utils/imports.d.ts +0 -4
  7. package/dist/cjs/file_utils/index.d.ts +0 -1
  8. package/dist/cjs/file_utils/src/delete_utils/imports.d.ts +0 -1
  9. package/dist/cjs/file_utils/src/delete_utils/index.d.ts +0 -1
  10. package/dist/cjs/file_utils/src/delete_utils/src/delete_row.d.ts +0 -2
  11. package/dist/cjs/file_utils/src/delete_utils/src/delete_select.d.ts +0 -1
  12. package/dist/cjs/file_utils/src/delete_utils/src/delete_selected.d.ts +0 -2
  13. package/dist/cjs/file_utils/src/delete_utils/src/index.d.ts +0 -3
  14. package/dist/cjs/file_utils/src/download_utils/imports.d.ts +0 -2
  15. package/dist/cjs/file_utils/src/download_utils/index.d.ts +0 -1
  16. package/dist/cjs/file_utils/src/download_utils/src/direct_download.d.ts +0 -2
  17. package/dist/cjs/file_utils/src/download_utils/src/download_file.d.ts +0 -2
  18. package/dist/cjs/file_utils/src/download_utils/src/download_select.d.ts +0 -1
  19. package/dist/cjs/file_utils/src/download_utils/src/index.d.ts +0 -5
  20. package/dist/cjs/file_utils/src/download_utils/src/target_downloads.d.ts +0 -4
  21. package/dist/cjs/file_utils/src/download_utils/src/trigger_download.d.ts +0 -2
  22. package/dist/cjs/file_utils/src/imports.d.ts +0 -2
  23. package/dist/cjs/file_utils/src/index.d.ts +0 -6
  24. package/dist/cjs/file_utils/src/list_utils/imports.d.ts +0 -2
  25. package/dist/cjs/file_utils/src/list_utils/index.d.ts +0 -1
  26. package/dist/cjs/file_utils/src/list_utils/src/index.d.ts +0 -1
  27. package/dist/cjs/file_utils/src/list_utils/src/list_utils.d.ts +0 -2
  28. package/dist/cjs/file_utils/src/select_utils/index.d.ts +0 -1
  29. package/dist/cjs/file_utils/src/select_utils/src/index.d.ts +0 -3
  30. package/dist/cjs/file_utils/src/select_utils/src/init_select_all.d.ts +0 -2
  31. package/dist/cjs/file_utils/src/select_utils/src/sync_header_checkbox.d.ts +0 -5
  32. package/dist/cjs/file_utils/src/select_utils/src/toggle_checkboxes.d.ts +0 -2
  33. package/dist/cjs/file_utils/src/share_utils/imports.d.ts +0 -2
  34. package/dist/cjs/file_utils/src/share_utils/index.d.ts +0 -1
  35. package/dist/cjs/file_utils/src/share_utils/src/index.d.ts +0 -1
  36. package/dist/cjs/file_utils/src/share_utils/src/share_utils.d.ts +0 -7
  37. package/dist/cjs/file_utils/src/upload_utils/imports.d.ts +0 -1
  38. package/dist/cjs/file_utils/src/upload_utils/index.d.ts +0 -1
  39. package/dist/cjs/file_utils/src/upload_utils/src/index.d.ts +0 -3
  40. package/dist/cjs/file_utils/src/upload_utils/src/patch_file_settings.d.ts +0 -2
  41. package/dist/cjs/file_utils/src/upload_utils/src/upload_file.d.ts +0 -2
  42. package/dist/cjs/file_utils/src/upload_utils/src/upload_files.d.ts +0 -5
  43. package/dist/cjs/functions/fetch_utils/fetchIt_utils.d.ts +0 -14
  44. package/dist/cjs/hooks/index.d.ts +0 -1
  45. package/dist/cjs/hooks/useFiles/imports.d.ts +0 -6
  46. package/dist/cjs/hooks/useFiles/index.d.ts +0 -1
  47. package/dist/cjs/hooks/useFiles/src/deleteFile.d.ts +0 -5
  48. package/dist/cjs/hooks/useFiles/src/index.d.ts +0 -5
  49. package/dist/cjs/hooks/useFiles/src/load.d.ts +0 -5
  50. package/dist/cjs/hooks/useFiles/src/patchShareSettings.d.ts +0 -9
  51. package/dist/cjs/hooks/useFiles/src/toggleShare.d.ts +0 -5
  52. package/dist/cjs/hooks/useFiles/src/useFiles.d.ts +0 -13
  53. package/dist/config.d.ts +0 -5
  54. package/dist/esm/config.d.ts +0 -5
  55. package/dist/esm/file_utils/imports.d.ts +0 -4
  56. package/dist/esm/file_utils/index.d.ts +0 -1
  57. package/dist/esm/file_utils/src/delete_utils/imports.d.ts +0 -1
  58. package/dist/esm/file_utils/src/delete_utils/index.d.ts +0 -1
  59. package/dist/esm/file_utils/src/delete_utils/src/delete_row.d.ts +0 -2
  60. package/dist/esm/file_utils/src/delete_utils/src/delete_select.d.ts +0 -1
  61. package/dist/esm/file_utils/src/delete_utils/src/delete_selected.d.ts +0 -2
  62. package/dist/esm/file_utils/src/delete_utils/src/index.d.ts +0 -3
  63. package/dist/esm/file_utils/src/download_utils/imports.d.ts +0 -2
  64. package/dist/esm/file_utils/src/download_utils/index.d.ts +0 -1
  65. package/dist/esm/file_utils/src/download_utils/src/direct_download.d.ts +0 -2
  66. package/dist/esm/file_utils/src/download_utils/src/download_file.d.ts +0 -2
  67. package/dist/esm/file_utils/src/download_utils/src/download_select.d.ts +0 -1
  68. package/dist/esm/file_utils/src/download_utils/src/index.d.ts +0 -5
  69. package/dist/esm/file_utils/src/download_utils/src/target_downloads.d.ts +0 -4
  70. package/dist/esm/file_utils/src/download_utils/src/trigger_download.d.ts +0 -2
  71. package/dist/esm/file_utils/src/imports.d.ts +0 -2
  72. package/dist/esm/file_utils/src/index.d.ts +0 -6
  73. package/dist/esm/file_utils/src/list_utils/imports.d.ts +0 -2
  74. package/dist/esm/file_utils/src/list_utils/index.d.ts +0 -1
  75. package/dist/esm/file_utils/src/list_utils/src/index.d.ts +0 -1
  76. package/dist/esm/file_utils/src/list_utils/src/list_utils.d.ts +0 -2
  77. package/dist/esm/file_utils/src/select_utils/index.d.ts +0 -1
  78. package/dist/esm/file_utils/src/select_utils/src/index.d.ts +0 -3
  79. package/dist/esm/file_utils/src/select_utils/src/init_select_all.d.ts +0 -2
  80. package/dist/esm/file_utils/src/select_utils/src/sync_header_checkbox.d.ts +0 -5
  81. package/dist/esm/file_utils/src/select_utils/src/toggle_checkboxes.d.ts +0 -2
  82. package/dist/esm/file_utils/src/share_utils/imports.d.ts +0 -2
  83. package/dist/esm/file_utils/src/share_utils/index.d.ts +0 -1
  84. package/dist/esm/file_utils/src/share_utils/src/index.d.ts +0 -1
  85. package/dist/esm/file_utils/src/share_utils/src/share_utils.d.ts +0 -7
  86. package/dist/esm/file_utils/src/upload_utils/imports.d.ts +0 -1
  87. package/dist/esm/file_utils/src/upload_utils/index.d.ts +0 -1
  88. package/dist/esm/file_utils/src/upload_utils/src/index.d.ts +0 -3
  89. package/dist/esm/file_utils/src/upload_utils/src/patch_file_settings.d.ts +0 -2
  90. package/dist/esm/file_utils/src/upload_utils/src/upload_file.d.ts +0 -2
  91. package/dist/esm/file_utils/src/upload_utils/src/upload_files.d.ts +0 -5
  92. package/dist/esm/functions/fetch_utils/fetchIt_utils.d.ts +0 -14
  93. package/dist/esm/hooks/index.d.ts +0 -1
  94. package/dist/esm/hooks/useFiles/imports.d.ts +0 -6
  95. package/dist/esm/hooks/useFiles/index.d.ts +0 -1
  96. package/dist/esm/hooks/useFiles/src/deleteFile.d.ts +0 -5
  97. package/dist/esm/hooks/useFiles/src/index.d.ts +0 -5
  98. package/dist/esm/hooks/useFiles/src/load.d.ts +0 -5
  99. package/dist/esm/hooks/useFiles/src/patchShareSettings.d.ts +0 -9
  100. package/dist/esm/hooks/useFiles/src/toggleShare.d.ts +0 -5
  101. package/dist/esm/hooks/useFiles/src/useFiles.d.ts +0 -13
  102. package/dist/file_utils/imports.d.ts +0 -4
  103. package/dist/file_utils/index.d.ts +0 -1
  104. package/dist/file_utils/src/delete_utils/imports.d.ts +0 -1
  105. package/dist/file_utils/src/delete_utils/index.d.ts +0 -1
  106. package/dist/file_utils/src/delete_utils/src/delete_row.d.ts +0 -2
  107. package/dist/file_utils/src/delete_utils/src/delete_select.d.ts +0 -1
  108. package/dist/file_utils/src/delete_utils/src/delete_selected.d.ts +0 -2
  109. package/dist/file_utils/src/delete_utils/src/index.d.ts +0 -3
  110. package/dist/file_utils/src/download_utils/imports.d.ts +0 -2
  111. package/dist/file_utils/src/download_utils/index.d.ts +0 -1
  112. package/dist/file_utils/src/download_utils/src/direct_download.d.ts +0 -2
  113. package/dist/file_utils/src/download_utils/src/download_file.d.ts +0 -2
  114. package/dist/file_utils/src/download_utils/src/download_select.d.ts +0 -1
  115. package/dist/file_utils/src/download_utils/src/index.d.ts +0 -5
  116. package/dist/file_utils/src/download_utils/src/target_downloads.d.ts +0 -4
  117. package/dist/file_utils/src/download_utils/src/trigger_download.d.ts +0 -2
  118. package/dist/file_utils/src/imports.d.ts +0 -2
  119. package/dist/file_utils/src/index.d.ts +0 -6
  120. package/dist/file_utils/src/list_utils/imports.d.ts +0 -2
  121. package/dist/file_utils/src/list_utils/index.d.ts +0 -1
  122. package/dist/file_utils/src/list_utils/src/index.d.ts +0 -1
  123. package/dist/file_utils/src/list_utils/src/list_utils.d.ts +0 -2
  124. package/dist/file_utils/src/select_utils/index.d.ts +0 -1
  125. package/dist/file_utils/src/select_utils/src/index.d.ts +0 -3
  126. package/dist/file_utils/src/select_utils/src/init_select_all.d.ts +0 -2
  127. package/dist/file_utils/src/select_utils/src/sync_header_checkbox.d.ts +0 -5
  128. package/dist/file_utils/src/select_utils/src/toggle_checkboxes.d.ts +0 -2
  129. package/dist/file_utils/src/share_utils/imports.d.ts +0 -2
  130. package/dist/file_utils/src/share_utils/index.d.ts +0 -1
  131. package/dist/file_utils/src/share_utils/src/index.d.ts +0 -1
  132. package/dist/file_utils/src/share_utils/src/share_utils.d.ts +0 -7
  133. package/dist/file_utils/src/upload_utils/imports.d.ts +0 -1
  134. package/dist/file_utils/src/upload_utils/index.d.ts +0 -1
  135. package/dist/file_utils/src/upload_utils/src/index.d.ts +0 -3
  136. package/dist/file_utils/src/upload_utils/src/patch_file_settings.d.ts +0 -2
  137. package/dist/file_utils/src/upload_utils/src/upload_file.d.ts +0 -2
  138. package/dist/file_utils/src/upload_utils/src/upload_files.d.ts +0 -5
  139. package/dist/functions/fetch_utils/fetchIt_utils.d.ts +0 -14
  140. package/dist/hooks/index.d.ts +0 -1
  141. package/dist/hooks/useFiles/imports.d.ts +0 -10
  142. package/dist/hooks/useFiles/index.d.ts +0 -1
  143. package/dist/hooks/useFiles/src/deleteFile.d.ts +0 -5
  144. package/dist/hooks/useFiles/src/index.d.ts +0 -6
  145. package/dist/hooks/useFiles/src/load.d.ts +0 -5
  146. package/dist/hooks/useFiles/src/patchShareSettings.d.ts +0 -6
  147. package/dist/hooks/useFiles/src/toggleShare.d.ts +0 -5
  148. package/dist/hooks/useFiles/src/useFiles.d.ts +0 -13
  149. package/dist/hooks/useFiles/src/useSaveShareSettings.d.ts +0 -2
@@ -1,13 +1,17 @@
1
- /**
2
-
3
- ***Changes**:
4
- *- Updated import paths to match the library structure (`../utils`, `../functions/fetch`, `../functions/auth`).
5
- *- Added `getAuthorizationHeader` import to support token-based authentication.
6
- *- Adjusted the `secureFetchIt` call to expect a response with `{ result: { token: string }; success: boolean }`, matching the `api.ts` expectation.
7
- *
8
- *2. **Input Component** (`src/utils/Input.tsx`):
9
- * Copy from `/var/www/abstractendeavors/my-login-app/src/components/utils/src/Inputs.tsx`.
10
- *
11
- */
12
- import type { InputProps } from "./../imports";
13
- export declare const Input: React.FC<InputProps>;
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,13 +1,17 @@
1
- /**
2
-
3
- ***Changes**:
4
- *- Updated import paths to match the library structure (`../utils`, `../functions/fetch`, `../functions/auth`).
5
- *- Added `getAuthorizationHeader` import to support token-based authentication.
6
- *- Adjusted the `secureFetchIt` call to expect a response with `{ result: { token: string }; success: boolean }`, matching the `api.ts` expectation.
7
- *
8
- *2. **Input Component** (`src/utils/Input.tsx`):
9
- * Copy from `/var/www/abstractendeavors/my-login-app/src/components/utils/src/Inputs.tsx`.
10
- *
11
- */
12
- import type { InputProps } from "./../imports";
13
- export declare const Input: React.FC<InputProps>;
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,13 +1,17 @@
1
- /**
2
-
3
- ***Changes**:
4
- *- Updated import paths to match the library structure (`../utils`, `../functions/fetch`, `../functions/auth`).
5
- *- Added `getAuthorizationHeader` import to support token-based authentication.
6
- *- Adjusted the `secureFetchIt` call to expect a response with `{ result: { token: string }; success: boolean }`, matching the `api.ts` expectation.
7
- *
8
- *2. **Input Component** (`src/utils/Input.tsx`):
9
- * Copy from `/var/www/abstractendeavors/my-login-app/src/components/utils/src/Inputs.tsx`.
10
- *
11
- */
12
- import type { InputProps } from "./../imports";
13
- export declare const Input: React.FC<InputProps>;
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putkoff/abstract-utilities",
3
- "version": "0.1.110",
3
+ "version": "0.1.112",
4
4
  "type": "module",
5
5
  "description": "A reusable React Login component with JWT authentication",
6
6
  "main": "dist/cjs/index.js",
@@ -73,6 +73,7 @@
73
73
  "dependencies": {
74
74
  "@putkoff/abstract_utilities": "^0.0.1",
75
75
  "@putkoff/abstract-utilities": "^0.1.107",
76
+ "@rollup/plugin-json": "^6.1.0",
76
77
  "path-browserify": "^1.0.1"
77
78
  }
78
79
  }
@@ -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,4 +0,0 @@
1
- export { secureFetchIt, fetchSharePatch } from "./../functions/fetch_utils";
2
- export { requireToken } from "./../functions/auth_utils";
3
- export type { FileItem, ApiRow } from './../types';
4
- export { alertit } from './../functions/rndm_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export { secureFetchIt, requireToken, alertit } from "./../imports";
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,2 +0,0 @@
1
- /** Given a checkbox inside a table-row → download that row’s file. */
2
- export declare function removeRow(cb: HTMLInputElement): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function removeFile(item: any): Promise<void>;
@@ -1,2 +0,0 @@
1
- /** Bulk download: pass a NodeList or array of checkboxes. */
2
- export declare function removeSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -1,3 +0,0 @@
1
- export * from './delete_select';
2
- export * from './delete_selected';
3
- export * from './delete_row';
@@ -1,2 +0,0 @@
1
- export { secureFetchIt, requireToken } from './../imports';
2
- export { FileItem } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,2 +0,0 @@
1
- /** Non-React “direct download” used by some old links (kept for parity) */
2
- export declare function directDownload(relPath: string, filename: string): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function downloadFile(item: FileItem): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function downloadSelect(relPath: string, filename: string): Promise<void>;
@@ -1,5 +0,0 @@
1
- export * from './direct_download';
2
- export * from './download_file';
3
- export * from './download_select';
4
- export * from './target_downloads';
5
- export * from './trigger_download';
@@ -1,4 +0,0 @@
1
- /** Given a checkbox inside a table-row → download that row’s file. */
2
- export declare function downloadRow(cb: HTMLInputElement): Promise<void>;
3
- /** Bulk download: pass a NodeList or array of checkboxes. */
4
- export declare function downloadSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -1,2 +0,0 @@
1
- /** Helper function to trigger file download */
2
- export declare function triggerDownload(blob: Blob, filename: string): void;
@@ -1,2 +0,0 @@
1
- export type { FileItem, ApiRow } from './../imports';
2
- export { alertit, requireToken, secureFetchIt, fetchSharePatch } from './../imports';
@@ -1,6 +0,0 @@
1
- export * from './download_utils';
2
- export * from './select_utils';
3
- export * from './upload_utils';
4
- export * from './delete_utils';
5
- export * from './list_utils';
6
- export * from './share_utils';
@@ -1,2 +0,0 @@
1
- export { secureFetchIt, fetchSharePatch } from './../imports';
2
- export type { FileItem, ApiRow } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './list_utils';
@@ -1,2 +0,0 @@
1
- /** GET /secure-list */
2
- export declare function listFiles(setFiles?: any): Promise<any>;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,3 +0,0 @@
1
- export * from './init_select_all';
2
- export * from './sync_header_checkbox';
3
- export * from './toggle_checkboxes';
@@ -1,2 +0,0 @@
1
- /** Wire up header + row checkboxes once the table is in the DOM. */
2
- export declare function initSelectAll(): void;
@@ -1,5 +0,0 @@
1
- /**
2
- * Classic “select all rows” logic (still handy in non-React views
3
- * such as the admin dashboard).
4
- */
5
- export declare function syncHeaderCheckbox(): void;
@@ -1,2 +0,0 @@
1
- /** Utility for other screens: toggle a list of checkboxes on/off. */
2
- export declare function toggleCheckboxes(cbs: HTMLInputElement[]): void;
@@ -1,2 +0,0 @@
1
- export type { FileItem } from './../imports';
2
- export { fetchSharePatch } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './share_utils';
@@ -1,7 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function getToggleShare(file: any): boolean;
3
- export declare function updateFileShare(file: any): FileItem;
4
- /**
5
- * Custom hook to toggle share settings on a file item
6
- */
7
- export declare function toggleShare(file: FileItem): Promise<void>;
@@ -1 +0,0 @@
1
- export { secureFetchIt } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,3 +0,0 @@
1
- export * from './patch_file_settings';
2
- export * from './upload_file';
3
- export * from './upload_files';
@@ -1,2 +0,0 @@
1
- /** Generic PATCH helper kept for other admin forms */
2
- export declare function patchFileSetting(fileId: string, field: string, value: unknown): Promise<Record<string, unknown>>;
@@ -1,2 +0,0 @@
1
- /** Classic file-upload for the fallback HTML page. */
2
- export declare function uploadFile(file: any, subdir: any): Promise<any>;
@@ -1,5 +0,0 @@
1
- interface UploadResponse {
2
- filepath: string;
3
- }
4
- export declare function uploadFiles(file: File, subdir?: string): Promise<UploadResponse>;
5
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
-
3
- ***Changes**: None, as it’s self-contained and doesn’t rely on external imports.
4
- *
5
- *4. **secureFetchIt** (`src/functions/fetch/secureFetchIt.ts`):
6
- * Since `secureFetchIt` isn’t provided, we’ll create a minimal implementation based on its usage in `Login` and `uploadFiles`. It’s assumed to be a wrapper around `fetch` that handles authentication and JSON parsing.
7
- *
8
- */
9
- /** Pulls base-URL from AppConfig.API_BASE_URL, strips trailing slashes */
10
- export declare function fetchIt(endpoint: string, body?: unknown, method?: string | null, headers?: Record<string, string> | null, blob?: boolean | null, no_api?: boolean, requireAuth?: boolean): Promise<unknown>;
11
- export declare function secureFetchIt<T>(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: false, noApi?: boolean, requireAuth?: boolean): Promise<T>;
12
- export declare function secureFetchIt(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean): Promise<Blob>;
13
- export declare function requestPatch(url: string, body?: unknown): Promise<Response>;
14
- export declare function fetchSharePatch(file: unknown): Promise<void>;
@@ -1 +0,0 @@
1
- export * from './useFiles';
@@ -1,6 +0,0 @@
1
- export { useCallback } from 'react';
2
- export type { FileItem, ApiRow } from './../../types';
3
- export { secureFetchIt, fetchSharePatch } from './../../functions/fetch_utils';
4
- export { alertit } from './../../functions/rndm_utils';
5
- export { useState, useEffect } from 'react';
6
- export { toggleShare, removeFile, listFiles } from './../../file_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook to toggle share settings on a file item
4
- */
5
- export declare const useDeleteFile: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
@@ -1,5 +0,0 @@
1
- export * from './load';
2
- export * from './toggleShare';
3
- export * from './patchShareSettings';
4
- export * from './useFiles';
5
- export * from './deleteFile';
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook that returns a memoized loadFiles callback
4
- */
5
- export declare const useLoadFiles: (setLoading: React.Dispatch<React.SetStateAction<boolean>>, setError: React.Dispatch<React.SetStateAction<Error | null>>, setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => () => Promise<void>;
@@ -1,9 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook for optimistic share-setting patch updates
4
- */
5
- /**
6
- * Custom hook to toggle share settings on a file item
7
- */
8
- export declare const usePatchShareSettings: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
9
- export default usePatchShareSettings;
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook to toggle share settings on a file item
4
- */
5
- export declare const useToggleShare: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
@@ -1,13 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function useFiles(): {
3
- files: FileItem[];
4
- loading: boolean;
5
- error: Error | null;
6
- load: () => Promise<void>;
7
- toggleShare: (file: FileItem) => Promise<void>;
8
- patchShareSettings: (file: FileItem) => Promise<void>;
9
- deleteFile: (file: FileItem) => Promise<void>;
10
- setFiles: import("react").Dispatch<import("react").SetStateAction<FileItem[]>>;
11
- setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
12
- setError: import("react").Dispatch<import("react").SetStateAction<Error | null>>;
13
- };
package/dist/config.d.ts DELETED
@@ -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,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,4 +0,0 @@
1
- export { secureFetchIt, fetchSharePatch } from "./../functions/fetch_utils";
2
- export { requireToken } from "./../functions/auth_utils";
3
- export type { FileItem, ApiRow } from './../types';
4
- export { alertit } from './../functions/rndm_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export { secureFetchIt, requireToken, alertit } from "./../imports";
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,2 +0,0 @@
1
- /** Given a checkbox inside a table-row → download that row’s file. */
2
- export declare function removeRow(cb: HTMLInputElement): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function removeFile(item: any): Promise<void>;
@@ -1,2 +0,0 @@
1
- /** Bulk download: pass a NodeList or array of checkboxes. */
2
- export declare function removeSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -1,3 +0,0 @@
1
- export * from './delete_select';
2
- export * from './delete_selected';
3
- export * from './delete_row';
@@ -1,2 +0,0 @@
1
- export { secureFetchIt, requireToken } from './../imports';
2
- export { FileItem } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,2 +0,0 @@
1
- /** Non-React “direct download” used by some old links (kept for parity) */
2
- export declare function directDownload(relPath: string, filename: string): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function downloadFile(item: FileItem): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function downloadSelect(relPath: string, filename: string): Promise<void>;
@@ -1,5 +0,0 @@
1
- export * from './direct_download';
2
- export * from './download_file';
3
- export * from './download_select';
4
- export * from './target_downloads';
5
- export * from './trigger_download';
@@ -1,4 +0,0 @@
1
- /** Given a checkbox inside a table-row → download that row’s file. */
2
- export declare function downloadRow(cb: HTMLInputElement): Promise<void>;
3
- /** Bulk download: pass a NodeList or array of checkboxes. */
4
- export declare function downloadSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -1,2 +0,0 @@
1
- /** Helper function to trigger file download */
2
- export declare function triggerDownload(blob: Blob, filename: string): void;
@@ -1,2 +0,0 @@
1
- export type { FileItem, ApiRow } from './../imports';
2
- export { alertit, requireToken, secureFetchIt, fetchSharePatch } from './../imports';
@@ -1,6 +0,0 @@
1
- export * from './download_utils';
2
- export * from './select_utils';
3
- export * from './upload_utils';
4
- export * from './delete_utils';
5
- export * from './list_utils';
6
- export * from './share_utils';
@@ -1,2 +0,0 @@
1
- export { secureFetchIt, fetchSharePatch } from './../imports';
2
- export type { FileItem, ApiRow } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './list_utils';
@@ -1,2 +0,0 @@
1
- /** GET /secure-list */
2
- export declare function listFiles(setFiles?: any): Promise<any>;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,3 +0,0 @@
1
- export * from './init_select_all';
2
- export * from './sync_header_checkbox';
3
- export * from './toggle_checkboxes';
@@ -1,2 +0,0 @@
1
- /** Wire up header + row checkboxes once the table is in the DOM. */
2
- export declare function initSelectAll(): void;
@@ -1,5 +0,0 @@
1
- /**
2
- * Classic “select all rows” logic (still handy in non-React views
3
- * such as the admin dashboard).
4
- */
5
- export declare function syncHeaderCheckbox(): void;
@@ -1,2 +0,0 @@
1
- /** Utility for other screens: toggle a list of checkboxes on/off. */
2
- export declare function toggleCheckboxes(cbs: HTMLInputElement[]): void;
@@ -1,2 +0,0 @@
1
- export type { FileItem } from './../imports';
2
- export { fetchSharePatch } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './share_utils';
@@ -1,7 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function getToggleShare(file: any): boolean;
3
- export declare function updateFileShare(file: any): FileItem;
4
- /**
5
- * Custom hook to toggle share settings on a file item
6
- */
7
- export declare function toggleShare(file: FileItem): Promise<void>;
@@ -1 +0,0 @@
1
- export { secureFetchIt } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,3 +0,0 @@
1
- export * from './patch_file_settings';
2
- export * from './upload_file';
3
- export * from './upload_files';
@@ -1,2 +0,0 @@
1
- /** Generic PATCH helper kept for other admin forms */
2
- export declare function patchFileSetting(fileId: string, field: string, value: unknown): Promise<Record<string, unknown>>;
@@ -1,2 +0,0 @@
1
- /** Classic file-upload for the fallback HTML page. */
2
- export declare function uploadFile(file: any, subdir: any): Promise<any>;
@@ -1,5 +0,0 @@
1
- interface UploadResponse {
2
- filepath: string;
3
- }
4
- export declare function uploadFiles(file: File, subdir?: string): Promise<UploadResponse>;
5
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
-
3
- ***Changes**: None, as it’s self-contained and doesn’t rely on external imports.
4
- *
5
- *4. **secureFetchIt** (`src/functions/fetch/secureFetchIt.ts`):
6
- * Since `secureFetchIt` isn’t provided, we’ll create a minimal implementation based on its usage in `Login` and `uploadFiles`. It’s assumed to be a wrapper around `fetch` that handles authentication and JSON parsing.
7
- *
8
- */
9
- /** Pulls base-URL from AppConfig.API_BASE_URL, strips trailing slashes */
10
- export declare function fetchIt(endpoint: string, body?: unknown, method?: string | null, headers?: Record<string, string> | null, blob?: boolean | null, no_api?: boolean, requireAuth?: boolean): Promise<unknown>;
11
- export declare function secureFetchIt<T>(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: false, noApi?: boolean, requireAuth?: boolean): Promise<T>;
12
- export declare function secureFetchIt(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean): Promise<Blob>;
13
- export declare function requestPatch(url: string, body?: unknown): Promise<Response>;
14
- export declare function fetchSharePatch(file: unknown): Promise<void>;
@@ -1 +0,0 @@
1
- export * from './useFiles';
@@ -1,6 +0,0 @@
1
- export { useCallback } from 'react';
2
- export type { FileItem, ApiRow } from './../../types';
3
- export { secureFetchIt, fetchSharePatch } from './../../functions/fetch_utils';
4
- export { alertit } from './../../functions/rndm_utils';
5
- export { useState, useEffect } from 'react';
6
- export { toggleShare, removeFile, listFiles } from './../../file_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook to toggle share settings on a file item
4
- */
5
- export declare const useDeleteFile: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
@@ -1,5 +0,0 @@
1
- export * from './load';
2
- export * from './toggleShare';
3
- export * from './patchShareSettings';
4
- export * from './useFiles';
5
- export * from './deleteFile';
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook that returns a memoized loadFiles callback
4
- */
5
- export declare const useLoadFiles: (setLoading: React.Dispatch<React.SetStateAction<boolean>>, setError: React.Dispatch<React.SetStateAction<Error | null>>, setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => () => Promise<void>;
@@ -1,9 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook for optimistic share-setting patch updates
4
- */
5
- /**
6
- * Custom hook to toggle share settings on a file item
7
- */
8
- export declare const usePatchShareSettings: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
9
- export default usePatchShareSettings;
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook to toggle share settings on a file item
4
- */
5
- export declare const useToggleShare: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
@@ -1,13 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function useFiles(): {
3
- files: FileItem[];
4
- loading: boolean;
5
- error: Error | null;
6
- load: () => Promise<void>;
7
- toggleShare: (file: FileItem) => Promise<void>;
8
- patchShareSettings: (file: FileItem) => Promise<void>;
9
- deleteFile: (file: FileItem) => Promise<void>;
10
- setFiles: import("react").Dispatch<import("react").SetStateAction<FileItem[]>>;
11
- setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
12
- setError: import("react").Dispatch<import("react").SetStateAction<Error | null>>;
13
- };
@@ -1,4 +0,0 @@
1
- export { secureFetchIt, fetchSharePatch } from "./../functions/fetch_utils";
2
- export { requireToken } from "./../functions/auth_utils";
3
- export type { FileItem, ApiRow } from './../types';
4
- export { alertit } from './../functions/rndm_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export { secureFetchIt, requireToken, alertit } from "./../imports";
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,2 +0,0 @@
1
- /** Given a checkbox inside a table-row → download that row’s file. */
2
- export declare function removeRow(cb: HTMLInputElement): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function removeFile(item: any): Promise<void>;
@@ -1,2 +0,0 @@
1
- /** Bulk download: pass a NodeList or array of checkboxes. */
2
- export declare function removeSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -1,3 +0,0 @@
1
- export * from './delete_select';
2
- export * from './delete_selected';
3
- export * from './delete_row';
@@ -1,2 +0,0 @@
1
- export { secureFetchIt, requireToken } from './../imports';
2
- export { FileItem } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,2 +0,0 @@
1
- /** Non-React “direct download” used by some old links (kept for parity) */
2
- export declare function directDownload(relPath: string, filename: string): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function downloadFile(item: FileItem): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function downloadSelect(relPath: string, filename: string): Promise<void>;
@@ -1,5 +0,0 @@
1
- export * from './direct_download';
2
- export * from './download_file';
3
- export * from './download_select';
4
- export * from './target_downloads';
5
- export * from './trigger_download';
@@ -1,4 +0,0 @@
1
- /** Given a checkbox inside a table-row → download that row’s file. */
2
- export declare function downloadRow(cb: HTMLInputElement): Promise<void>;
3
- /** Bulk download: pass a NodeList or array of checkboxes. */
4
- export declare function downloadSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -1,2 +0,0 @@
1
- /** Helper function to trigger file download */
2
- export declare function triggerDownload(blob: Blob, filename: string): void;
@@ -1,2 +0,0 @@
1
- export type { FileItem, ApiRow } from './../imports';
2
- export { alertit, requireToken, secureFetchIt, fetchSharePatch } from './../imports';
@@ -1,6 +0,0 @@
1
- export * from './download_utils';
2
- export * from './select_utils';
3
- export * from './upload_utils';
4
- export * from './delete_utils';
5
- export * from './list_utils';
6
- export * from './share_utils';
@@ -1,2 +0,0 @@
1
- export { secureFetchIt, fetchSharePatch } from './../imports';
2
- export type { FileItem, ApiRow } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './list_utils';
@@ -1,2 +0,0 @@
1
- /** GET /secure-list */
2
- export declare function listFiles(setFiles?: any): Promise<any>;
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,3 +0,0 @@
1
- export * from './init_select_all';
2
- export * from './sync_header_checkbox';
3
- export * from './toggle_checkboxes';
@@ -1,2 +0,0 @@
1
- /** Wire up header + row checkboxes once the table is in the DOM. */
2
- export declare function initSelectAll(): void;
@@ -1,5 +0,0 @@
1
- /**
2
- * Classic “select all rows” logic (still handy in non-React views
3
- * such as the admin dashboard).
4
- */
5
- export declare function syncHeaderCheckbox(): void;
@@ -1,2 +0,0 @@
1
- /** Utility for other screens: toggle a list of checkboxes on/off. */
2
- export declare function toggleCheckboxes(cbs: HTMLInputElement[]): void;
@@ -1,2 +0,0 @@
1
- export type { FileItem } from './../imports';
2
- export { fetchSharePatch } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1 +0,0 @@
1
- export * from './share_utils';
@@ -1,7 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare function getToggleShare(file: any): boolean;
3
- export declare function updateFileShare(file: any): FileItem;
4
- /**
5
- * Custom hook to toggle share settings on a file item
6
- */
7
- export declare function toggleShare(file: FileItem): Promise<void>;
@@ -1 +0,0 @@
1
- export { secureFetchIt } from './../imports';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,3 +0,0 @@
1
- export * from './patch_file_settings';
2
- export * from './upload_file';
3
- export * from './upload_files';
@@ -1,2 +0,0 @@
1
- /** Generic PATCH helper kept for other admin forms */
2
- export declare function patchFileSetting(fileId: string, field: string, value: unknown): Promise<Record<string, unknown>>;
@@ -1,2 +0,0 @@
1
- /** Classic file-upload for the fallback HTML page. */
2
- export declare function uploadFile(file: any, subdir: any): Promise<any>;
@@ -1,5 +0,0 @@
1
- interface UploadResponse {
2
- filepath: string;
3
- }
4
- export declare function uploadFiles(file: File, subdir?: string): Promise<UploadResponse>;
5
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
-
3
- ***Changes**: None, as it’s self-contained and doesn’t rely on external imports.
4
- *
5
- *4. **secureFetchIt** (`src/functions/fetch/secureFetchIt.ts`):
6
- * Since `secureFetchIt` isn’t provided, we’ll create a minimal implementation based on its usage in `Login` and `uploadFiles`. It’s assumed to be a wrapper around `fetch` that handles authentication and JSON parsing.
7
- *
8
- */
9
- /** Pulls base-URL from AppConfig.API_BASE_URL, strips trailing slashes */
10
- export declare function fetchIt(endpoint: string, body?: unknown, method?: string | null, headers?: Record<string, string> | null, blob?: boolean | null, no_api?: boolean, requireAuth?: boolean): Promise<unknown>;
11
- export declare function secureFetchIt<T>(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: false, noApi?: boolean, requireAuth?: boolean): Promise<T>;
12
- export declare function secureFetchIt(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean): Promise<Blob>;
13
- export declare function requestPatch(url: string, body?: unknown): Promise<Response>;
14
- export declare function fetchSharePatch(file: unknown): Promise<void>;
@@ -1 +0,0 @@
1
- export * from './useFiles';
@@ -1,10 +0,0 @@
1
- export { useCallback } from 'react';
2
- export type { FileItem, ApiRow } from './../..//components/FileHandlers/types';
3
- export { getAuthorizationHeader } from "./../auth_utils";
4
- export { make_path } from './../path_utils';
5
- export { stripPrefixes } from './../string_utils';
6
- export { alertit } from './../rndm_utils';
7
- export { ensure_list } from './../type_utils';
8
- export { eatInner } from './../string_utils';
9
- export { secureFetchIt, fetchSharePatch } from './../fetch_utils';
10
- export { toggleShare, removeFile, listFiles, downloadFile } from './../../file_utils';
@@ -1 +0,0 @@
1
- export * from './src';
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook to toggle share settings on a file item
4
- */
5
- export declare const useDeleteFile: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
@@ -1,6 +0,0 @@
1
- export * from './load';
2
- export * from './toggleShare';
3
- export * from './patchShareSettings';
4
- export * from './useFiles';
5
- export * from './deleteFile';
6
- export * from './useSaveShareSettings';
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook that returns a memoized loadFiles callback
4
- */
5
- export declare const useLoadFiles: (setLoading: React.Dispatch<React.SetStateAction<boolean>>, setError: React.Dispatch<React.SetStateAction<Error | null>>, setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => () => Promise<void>;
@@ -1,6 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook to toggle share settings on a file item
4
- */
5
- export declare const usePatchShareSettings: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: any) => Promise<void>;
6
- export default usePatchShareSettings;
@@ -1,5 +0,0 @@
1
- import { FileItem } from './../imports';
2
- /**
3
- * Custom hook to toggle share settings on a file item
4
- */
5
- export declare const useToggleShare: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
@@ -1,13 +0,0 @@
1
- import type { FileItem } from './../imports';
2
- export declare function useFiles(): {
3
- files: FileItem[];
4
- loading: boolean;
5
- error: Error | null;
6
- load: () => Promise<void>;
7
- toggleShare: (file: FileItem) => Promise<void>;
8
- patchShareSettings: (updated: FileItem) => Promise<void>;
9
- deleteFile: (file: FileItem) => Promise<void>;
10
- setFiles: import("react").Dispatch<import("react").SetStateAction<FileItem[]>>;
11
- setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
12
- setError: import("react").Dispatch<import("react").SetStateAction<Error | null>>;
13
- };
@@ -1,2 +0,0 @@
1
- import { FileItem } from './../imports';
2
- export declare const useSaveShareSettings: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (updated: FileItem) => Promise<void>;