ag-common 0.0.158 → 0.0.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.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const LoginButton: ({ className, text, invert, savePath, loginPath, }: {
|
|
2
|
+
export declare const LoginButton: ({ className, text, invert, savePath, loginPath, style, }: {
|
|
3
3
|
invert?: boolean | undefined;
|
|
4
4
|
text: string;
|
|
5
5
|
className?: string | undefined;
|
|
6
6
|
savePath?: boolean | undefined;
|
|
7
7
|
loginPath: (state?: Record<string, unknown> | undefined) => string;
|
|
8
|
+
style?: Record<string, string | number | boolean> | undefined;
|
|
8
9
|
}) => JSX.Element;
|
|
@@ -10,12 +10,12 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
10
10
|
const Base = styled_components_1.default.a `
|
|
11
11
|
${Button_1.ButtonBase}
|
|
12
12
|
`;
|
|
13
|
-
const LoginButton = ({ className, text, invert, savePath = true, loginPath, }) => {
|
|
13
|
+
const LoginButton = ({ className, text, invert, savePath = true, loginPath, style, }) => {
|
|
14
14
|
const lp = loginPath(!savePath || typeof window === 'undefined'
|
|
15
15
|
? undefined
|
|
16
16
|
: {
|
|
17
17
|
redirect: window.location.href.substring(window.location.origin.length),
|
|
18
18
|
});
|
|
19
|
-
return (react_1.default.createElement(Base, { href: lp, title: text, "data-invert": invert, "data-disabled": false, className: className }, text));
|
|
19
|
+
return (react_1.default.createElement(Base, { style: style, href: lp, title: text, "data-invert": invert, "data-disabled": false, className: className }, text));
|
|
20
20
|
};
|
|
21
21
|
exports.LoginButton = LoginButton;
|
|
@@ -5,7 +5,9 @@ const react_1 = require("react");
|
|
|
5
5
|
const useOverloadPageSearch = ({ disabled = false, onTrigger, }) => {
|
|
6
6
|
(0, react_1.useEffect)(() => {
|
|
7
7
|
const ctrlF = (e) => {
|
|
8
|
-
|
|
8
|
+
const macSearch = e.metaKey && e.code === 'KeyF';
|
|
9
|
+
const winSearch = e.ctrlKey && e.code === 'KeyF';
|
|
10
|
+
if (winSearch || macSearch) {
|
|
9
11
|
e.preventDefault();
|
|
10
12
|
onTrigger();
|
|
11
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ag-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.162",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Andrei Gec <@andreigec> (https://gec.dev/)",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"aws-cdk-lib": "2.x",
|
|
17
|
-
"aws-sdk": "2.
|
|
17
|
+
"aws-sdk": "2.1077.0",
|
|
18
18
|
"axios": "0.26.0",
|
|
19
19
|
"constructs": "10.x",
|
|
20
20
|
"jsonwebtoken": "8.5.1",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jsonwebtoken": "8.5.8",
|
|
32
|
-
"@types/node": "17.0.
|
|
32
|
+
"@types/node": "17.0.19",
|
|
33
33
|
"@types/react": "17.0.39",
|
|
34
34
|
"@types/react-dom": "17.0.11",
|
|
35
|
-
"@types/styled-components": "5.1.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
37
|
-
"@typescript-eslint/parser": "5.
|
|
35
|
+
"@types/styled-components": "5.1.23",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "5.12.0",
|
|
37
|
+
"@typescript-eslint/parser": "5.12.0",
|
|
38
38
|
"eslint": "8.9.0",
|
|
39
39
|
"eslint-config-airbnb-typescript": "16.1.0",
|
|
40
|
-
"eslint-config-prettier": "8.
|
|
40
|
+
"eslint-config-prettier": "8.4.0",
|
|
41
41
|
"eslint-config-react-app": "7.0.0",
|
|
42
42
|
"eslint-plugin-import": "2.25.4",
|
|
43
43
|
"eslint-plugin-jsx-a11y": "6.5.1",
|