@putkoff/abstract-utilities 0.0.3 → 0.0.5

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.
@@ -0,0 +1,14 @@
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 +1 @@
1
- export * from './src';
1
+ export * from './fetchIt_utils';
@@ -1 +1 @@
1
- export * from './fetchIt_utils';
1
+ export * from './utils';
@@ -1,4 +1,5 @@
1
- import React from 'react';
2
- export declare function Button({ children, color, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
1
+ export declare function Button({ children, color, variant, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
3
2
  color?: 'gray' | 'green' | 'blue';
3
+ variant?: 'default' | 'icon' | 'primary' | 'secondary';
4
+ className?: string;
4
5
  }): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -306,8 +306,10 @@ declare function eatEnd(obj: string, endings?: string[]): string;
306
306
 
307
307
  declare function ensure_list<T>(obj: T | T[]): T[];
308
308
 
309
- declare function Button({ children, color, ...rest }: react__default.ButtonHTMLAttributes<HTMLButtonElement> & {
309
+ declare function Button({ children, color, variant, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
310
310
  color?: 'gray' | 'green' | 'blue';
311
+ variant?: 'default' | 'icon' | 'primary' | 'secondary';
312
+ className?: string;
311
313
  }): react_jsx_runtime.JSX.Element;
312
314
 
313
315
  declare function Checkbox({ label, ...rest }: react__default.InputHTMLAttributes<HTMLInputElement> & {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@putkoff/abstract-utilities","version":"0.0.003","type":"module","description":"A reusable React Login component with JWT authentication","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc --emitDeclarationOnly && rollup -c","test":"jest","prepublishOnly":"npm run build"},"keywords":["react","login","component","jwt","authentication"],"author":"Your Name","license":"MIT","peerDependencies":{"react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-typescript":"^11.1.5","@testing-library/jest-dom":"^6.4.2","@testing-library/react":"^14.2.1","@types/jest":"^29.5.12","@types/react":"^18.2.55","@types/react-dom":"^18.2.19","jest":"^29.7.0","postcss":"^8.5.6","rollup":"^4.12.0","rollup-plugin-dts":"^6.1.0","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.2","ts-jest":"^29.1.2","typescript":"^5.3.3"},"compilerOptions":{"target":"es2016","module":"esnext","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"jsx":"react-jsx","declaration":true,"declarationDir":"dist","outDir":"dist","moduleResolution":"node","allowSyntheticDefaultImports":true,"types":"dist/types/index.d.ts","allowImportingTsExtensions":true},"include":["src/**/*"],"exclude":["node_modules","dist"],"files":["dist/","src/components/Login/login_style.css","src/components/ChangePassword/change_password.css"],"dependencies":{"@putkoff/abstract_utilities":"^0.0.1","path-browserify":"^1.0.1"}}
1
+ {"name":"@putkoff/abstract-utilities","version":"0.0.005","type":"module","description":"A reusable React Login component with JWT authentication","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc --emitDeclarationOnly && rollup -c","test":"jest","prepublishOnly":"npm run build"},"keywords":["react","login","component","jwt","authentication"],"author":"Your Name","license":"MIT","peerDependencies":{"react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-typescript":"^11.1.5","@testing-library/jest-dom":"^6.4.2","@testing-library/react":"^14.2.1","@types/jest":"^29.5.12","@types/react":"^18.2.55","@types/react-dom":"^18.2.19","jest":"^29.7.0","postcss":"^8.5.6","rollup":"^4.12.0","rollup-plugin-dts":"^6.1.0","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.2","ts-jest":"^29.1.2","typescript":"^5.3.3"},"compilerOptions":{"target":"es2016","module":"esnext","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"jsx":"react-jsx","declaration":true,"declarationDir":"dist","outDir":"dist","moduleResolution":"node","allowSyntheticDefaultImports":true,"types":"dist/types/index.d.ts","allowImportingTsExtensions":true},"include":["src/**/*"],"exclude":["node_modules","dist"],"files":["dist/","src/components/Login/login_style.css","src/components/ChangePassword/change_password.css"],"dependencies":{"@putkoff/abstract_utilities":"^0.0.1","path-browserify":"^1.0.1"}}