ag-common 0.0.254 → 0.0.255
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/api/helpers/api.d.ts +1 -1
- package/dist/api/helpers/openApiHelpers.js +1 -1
- package/dist/common/helpers/date.d.ts +1 -1
- package/dist/ui/components/Chevron/index.d.ts +0 -1
- package/dist/ui/components/Confirm/Modal.d.ts +0 -1
- package/dist/ui/components/DropdownList/index.d.ts +0 -1
- package/dist/ui/components/DropdownList/types.d.ts +0 -1
- package/dist/ui/components/HeadersRaw/index.d.ts +0 -1
- package/dist/ui/components/KebabDots/index.d.ts +0 -1
- package/dist/ui/components/Loader/index.d.ts +0 -1
- package/dist/ui/components/LoginButton/index.d.ts +0 -1
- package/dist/ui/components/LogoutButton/index.d.ts +0 -1
- package/dist/ui/components/Modal/index.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/OpenApiCodeBlock.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/body.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/security.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/index.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/call.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/req.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/fetch/index.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/helpers/joinJsx.d.ts +0 -1
- package/dist/ui/components/OpenApiCodeBlock/types.d.ts +0 -1
- package/dist/ui/components/Prompt/Modal.d.ts +0 -1
- package/dist/ui/components/Search/Base.d.ts +0 -1
- package/dist/ui/components/Search/Inline.d.ts +0 -1
- package/dist/ui/components/Search/Modal.d.ts +0 -1
- package/dist/ui/components/Search/types.d.ts +0 -1
- package/dist/ui/components/Sidebar/index.d.ts +0 -1
- package/dist/ui/components/SparkLine/index.d.ts +0 -1
- package/dist/ui/components/Table/index.d.ts +0 -1
- package/dist/ui/components/TextEdit/CheckboxEdit.d.ts +0 -1
- package/dist/ui/components/TextEdit/ColourEdit.d.ts +0 -1
- package/dist/ui/components/TextEdit/LengthBox.d.ts +0 -1
- package/dist/ui/components/TextEdit/ListboxEdit.d.ts +0 -1
- package/dist/ui/components/TextEdit/RadioGroup.d.ts +0 -1
- package/dist/ui/components/TextEdit/TextEdit.d.ts +0 -1
- package/dist/ui/components/TextEdit/images.d.ts +0 -1
- package/dist/ui/components/Toast/index.d.ts +1 -2
- package/dist/ui/components/UserImage/index.d.ts +0 -1
- package/dist/ui/helpers/date.d.ts +1 -1
- package/dist/ui/helpers/jwt.d.ts +2 -2
- package/dist/ui/helpers/useLocalStorage.d.ts +3 -3
- package/package.json +12 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { APIGatewayProxyResult, DYNAMOKEYS } from '../types';
|
|
2
2
|
export declare const returnCode: <T>(statusCode: number, body?: T | undefined, extraHeaders?: {
|
|
3
3
|
[a: string]: string;
|
|
4
|
-
} | undefined, fullSiteUrl?: string
|
|
4
|
+
} | undefined, fullSiteUrl?: string) => APIGatewayProxyResult;
|
|
5
5
|
/**
|
|
6
6
|
* strip all dynamo generated keys. can optionally keep PK
|
|
7
7
|
* @param record
|
|
@@ -136,7 +136,7 @@ const openApiImpl = (p) => {
|
|
|
136
136
|
const entry = `${endpointsBase}${fullPath}/${verb.toUpperCase()}.ts`;
|
|
137
137
|
const lambdaV = new aws_cdk_lib_1.aws_lambda_nodejs.NodejsFunction(stack, lambdaName, {
|
|
138
138
|
functionName: lambdaName,
|
|
139
|
-
runtime: aws_cdk_lib_1.aws_lambda.Runtime.
|
|
139
|
+
runtime: aws_cdk_lib_1.aws_lambda.Runtime.NODEJS_16_X,
|
|
140
140
|
handler: 'handler',
|
|
141
141
|
environment: lc.environment,
|
|
142
142
|
memorySize: lc.memory,
|
|
@@ -11,4 +11,4 @@ export declare const CSharpToJs: (charpTicks: number) => Date;
|
|
|
11
11
|
* @param date default = now
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
|
-
export declare const dateTimeToNearestMinute: (minutes: number, date?: Date
|
|
14
|
+
export declare const dateTimeToNearestMinute: (minutes: number, date?: Date) => Date;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const ModalItem: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
2
|
export declare const Modal: ({ open, setOpen, children, position, topPosition, showCloseButton, closeOnMoveMouseOutside, className, closeOnClickOutside, }: {
|
|
4
3
|
open: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const joinJsx: (items: (JSX.Element | undefined)[], sep: JSX.Element[]) => JSX.Element[];
|
|
3
2
|
export declare const joinJsxWithSlash: (items: (JSX.Element | undefined)[]) => JSX.Element[];
|
|
4
3
|
export declare const joinJsxWithComma: (items: (JSX.Element | undefined)[]) => JSX.Element[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ISearchDialog, TSearchModalRes } from './types';
|
|
3
2
|
export declare const SearchBase: <T>({ onSelectItem, onSearchTextChange, placeholderText, closeText, renderItem, displayItems, willDisplayItem, getKeyF, }: ISearchDialog<T> & {
|
|
4
3
|
onSearchTextChange?: ((v: string) => void) | undefined;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ToastPosition } from 'react-hot-toast';
|
|
3
2
|
export interface IToastOptions {
|
|
4
3
|
appearance: 'error' | 'success';
|
|
5
4
|
autoClose?: number;
|
|
6
5
|
}
|
|
7
|
-
export declare const addToast: (m: string, options?: IToastOptions
|
|
6
|
+
export declare const addToast: (m: string, options?: IToastOptions) => void;
|
|
8
7
|
export declare const ToastProvider: ({ position }: {
|
|
9
8
|
position: ToastPosition;
|
|
10
9
|
}) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const daydiffstr: (dayticks: number) => string;
|
|
2
|
-
export declare const getDMY: (date: Date, dayOffset?: number
|
|
2
|
+
export declare const getDMY: (date: Date, dayOffset?: number) => string;
|
package/dist/ui/helpers/jwt.d.ts
CHANGED
|
@@ -74,5 +74,5 @@ export interface AuthedUserContext {
|
|
|
74
74
|
refreshToken: () => Promise<User | undefined>;
|
|
75
75
|
}
|
|
76
76
|
export declare const getBearerToken: (jwt?: {
|
|
77
|
-
id_token?: string
|
|
78
|
-
}
|
|
77
|
+
id_token?: string;
|
|
78
|
+
}) => string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const clearLocalStorageItem: (key: string) => void;
|
|
2
|
-
export declare const clearAllLocalStorage: (except?: string[]
|
|
3
|
-
export declare const setLocalStorageItem: <T>(key: string, value: T, ttl?: number
|
|
4
|
-
export declare const getLocalStorageItem: <T>(key: string, initialValue: T, ttl?: number
|
|
2
|
+
export declare const clearAllLocalStorage: (except?: string[]) => void;
|
|
3
|
+
export declare const setLocalStorageItem: <T>(key: string, value: T, ttl?: number) => void;
|
|
4
|
+
export declare const getLocalStorageItem: <T>(key: string, initialValue: T, ttl?: number) => T;
|
|
5
5
|
export declare function UseLocalStorage<T>(key: string, initialValue: T, ttl?: number): [T, (value: T | ((a: T) => T)) => void];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ag-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.255",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Andrei Gec <@andreigec> (https://gec.dev/)",
|
|
@@ -31,21 +31,21 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/core": "7.18.2",
|
|
34
|
-
"@storybook/addon-actions": "6.5.
|
|
35
|
-
"@storybook/addon-docs": "6.5.
|
|
36
|
-
"@storybook/addon-essentials": "6.5.
|
|
37
|
-
"@storybook/addon-interactions": "6.5.
|
|
38
|
-
"@storybook/addon-links": "6.5.
|
|
39
|
-
"@storybook/addons": "6.5.
|
|
40
|
-
"@storybook/react": "6.5.
|
|
41
|
-
"@storybook/theming": "6.5.
|
|
34
|
+
"@storybook/addon-actions": "6.5.6",
|
|
35
|
+
"@storybook/addon-docs": "6.5.6",
|
|
36
|
+
"@storybook/addon-essentials": "6.5.6",
|
|
37
|
+
"@storybook/addon-interactions": "6.5.6",
|
|
38
|
+
"@storybook/addon-links": "6.5.6",
|
|
39
|
+
"@storybook/addons": "6.5.6",
|
|
40
|
+
"@storybook/react": "6.5.6",
|
|
41
|
+
"@storybook/theming": "6.5.6",
|
|
42
42
|
"@types/jsonwebtoken": "8.5.8",
|
|
43
|
-
"@types/node": "17.0.
|
|
43
|
+
"@types/node": "17.0.36",
|
|
44
44
|
"@types/react": "17.0.43",
|
|
45
45
|
"@types/react-dom": "17.0.14",
|
|
46
46
|
"@types/styled-components": "5.1.25",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
48
|
-
"@typescript-eslint/parser": "5.
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "5.27.0",
|
|
48
|
+
"@typescript-eslint/parser": "5.27.0",
|
|
49
49
|
"cross-env": "7.0.3",
|
|
50
50
|
"eslint": "8.16.0",
|
|
51
51
|
"eslint-config-airbnb-typescript": "17.0.0",
|