ag-common 0.0.285 → 0.0.288
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/aws.js +2 -0
- package/dist/api/helpers/index.d.ts +1 -0
- package/dist/api/helpers/index.js +1 -0
- package/dist/api/helpers/sqs.d.ts +4 -0
- package/dist/api/helpers/sqs.js +39 -0
- package/dist/ui/components/Confirm/Modal.js +1 -1
- package/dist/ui/components/Modal/Dialog.d.ts +8 -0
- package/dist/ui/components/Modal/Dialog.js +31 -0
- package/dist/ui/components/Modal/Modal.d.ts +4 -0
- package/dist/ui/components/Modal/Modal.js +108 -0
- package/dist/ui/components/Modal/index.d.ts +3 -13
- package/dist/ui/components/Modal/index.js +5 -94
- package/dist/ui/components/Modal/types.d.ts +12 -0
- package/dist/ui/components/Modal/types.js +2 -0
- package/dist/ui/components/Prompt/Modal.js +1 -1
- package/dist/ui/components/Search/Modal.js +1 -1
- package/dist/ui/components/index.d.ts +1 -1
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/helpers/routes.d.ts +1 -4
- package/package.json +3 -3
package/dist/api/helpers/aws.js
CHANGED
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.setAwsRegion = void 0;
|
|
4
4
|
const dynamo_1 = require("./dynamo");
|
|
5
5
|
const s3_1 = require("./s3");
|
|
6
|
+
const __1 = require("../..");
|
|
6
7
|
const setAwsRegion = (region) => {
|
|
7
8
|
(0, dynamo_1.setDynamo)(region);
|
|
8
9
|
(0, s3_1.setS3)(region);
|
|
10
|
+
(0, __1.setSqs)(region);
|
|
9
11
|
};
|
|
10
12
|
exports.setAwsRegion = setAwsRegion;
|
|
@@ -21,5 +21,6 @@ __exportStar(require("./enforceDynamoProvisionCap"), exports);
|
|
|
21
21
|
__exportStar(require("./dynamoInfra"), exports);
|
|
22
22
|
__exportStar(require("./openApiHelpers"), exports);
|
|
23
23
|
__exportStar(require("./s3"), exports);
|
|
24
|
+
__exportStar(require("./sqs"), exports);
|
|
24
25
|
__exportStar(require("./validateOpenApi"), exports);
|
|
25
26
|
__exportStar(require("./validations"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.sendMessages = exports.setSqs = exports.sqs = void 0;
|
|
16
|
+
const common_1 = require("../../common");
|
|
17
|
+
const aws_sdk_1 = __importDefault(require("aws-sdk"));
|
|
18
|
+
// eslint-disable-next-line import/no-mutable-exports
|
|
19
|
+
exports.sqs = new aws_sdk_1.default.SQS();
|
|
20
|
+
const setSqs = (region) => {
|
|
21
|
+
exports.sqs = new aws_sdk_1.default.SQS({ region });
|
|
22
|
+
};
|
|
23
|
+
exports.setSqs = setSqs;
|
|
24
|
+
const sendMessages = (items, queueUrl) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
const req = {
|
|
26
|
+
QueueUrl: queueUrl,
|
|
27
|
+
Entries: items.map((i) => ({
|
|
28
|
+
MessageBody: JSON.stringify(i),
|
|
29
|
+
Id: (0, common_1.hashCode)(JSON.stringify(i)),
|
|
30
|
+
})),
|
|
31
|
+
};
|
|
32
|
+
const put = yield exports.sqs.sendMessageBatch(req).promise();
|
|
33
|
+
if (put.$response.error &&
|
|
34
|
+
put.$response.error.statusCode &&
|
|
35
|
+
put.$response.error.statusCode >= 400) {
|
|
36
|
+
throw new Error(put.$response.error.message);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
exports.sendMessages = sendMessages;
|
|
@@ -7,7 +7,7 @@ exports.ConfirmModal = void 0;
|
|
|
7
7
|
const Button_1 = require("../Button");
|
|
8
8
|
const FlexColumn_1 = require("../FlexColumn");
|
|
9
9
|
const FlexRow_1 = require("../FlexRow");
|
|
10
|
-
const Modal_1 = require("../Modal");
|
|
10
|
+
const Modal_1 = require("../Modal/Modal");
|
|
11
11
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
const react_1 = __importDefault(require("react"));
|
|
13
13
|
const Base = styled_components_1.default.div `
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ModalDialog = void 0;
|
|
16
|
+
const Modal_1 = require("./Modal");
|
|
17
|
+
const react_1 = __importDefault(require("react"));
|
|
18
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
19
|
+
const ModalDialog = (content) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
return new Promise((res) => {
|
|
21
|
+
const wrapper = document.body.appendChild(document.createElement('div'));
|
|
22
|
+
react_dom_1.default.render(react_1.default.createElement(Modal_1.Modal, { open: true, setOpen: (o) => {
|
|
23
|
+
if (!o) {
|
|
24
|
+
react_dom_1.default.unmountComponentAtNode(wrapper);
|
|
25
|
+
wrapper.remove();
|
|
26
|
+
}
|
|
27
|
+
res('ok');
|
|
28
|
+
}, topPosition: "center", position: "center" }, content), wrapper);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
exports.ModalDialog = ModalDialog;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IModal } from './types';
|
|
3
|
+
export declare const ModalItem: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const Modal: ({ open, setOpen, children, position, topPosition, showCloseButton, closeOnMoveMouseOutside, className, closeOnClickOutside, }: IModal) => JSX.Element;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Modal = exports.ModalItem = void 0;
|
|
30
|
+
const Close_1 = require("../Close");
|
|
31
|
+
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
32
|
+
const styles_1 = require("../../styles");
|
|
33
|
+
const react_1 = __importStar(require("react"));
|
|
34
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
35
|
+
const FixedBackground = styled_components_1.default.div `
|
|
36
|
+
position: fixed;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
42
|
+
z-index: 2;
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
align-items: center;
|
|
46
|
+
`;
|
|
47
|
+
const ModalBase = styled_components_1.default.div `
|
|
48
|
+
display: flex;
|
|
49
|
+
position: absolute;
|
|
50
|
+
z-index: 1;
|
|
51
|
+
background-color: white;
|
|
52
|
+
border: solid 1px transparent;
|
|
53
|
+
border-radius: 0.5rem;
|
|
54
|
+
box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.6), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
|
|
55
|
+
max-width: 95vw;
|
|
56
|
+
max-height: 95vh;
|
|
57
|
+
&[data-position='left'] {
|
|
58
|
+
left: 0;
|
|
59
|
+
}
|
|
60
|
+
&[data-position='right'] {
|
|
61
|
+
right: 0;
|
|
62
|
+
}
|
|
63
|
+
&[data-topposition='top'] {
|
|
64
|
+
top: 0;
|
|
65
|
+
}
|
|
66
|
+
&[data-topposition='bottom'] {
|
|
67
|
+
bottom: 0;
|
|
68
|
+
}
|
|
69
|
+
${(0, styles_1.bounce)('data-bounced')}
|
|
70
|
+
`;
|
|
71
|
+
exports.ModalItem = styled_components_1.default.div `
|
|
72
|
+
display: flex;
|
|
73
|
+
padding: 1rem;
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
background-color: #eee;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
const CloseStyled = (0, styled_components_1.default)(Close_1.Close) `
|
|
80
|
+
z-index: 1;
|
|
81
|
+
`;
|
|
82
|
+
const Modal = ({ open, setOpen, children, position = 'left', topPosition = 'top', showCloseButton = true, closeOnMoveMouseOutside = false, className, closeOnClickOutside = true, }) => {
|
|
83
|
+
const [bounced, setBounced] = (0, react_1.useState)(false);
|
|
84
|
+
const ref = (0, react_1.useRef)(null);
|
|
85
|
+
(0, useOnClickOutside_1.useOnClickOutside)({
|
|
86
|
+
disabled: !open,
|
|
87
|
+
ref,
|
|
88
|
+
moveMouseOutside: closeOnMoveMouseOutside,
|
|
89
|
+
}, () => {
|
|
90
|
+
if (closeOnClickOutside && open) {
|
|
91
|
+
setOpen(false);
|
|
92
|
+
setBounced(false);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
(0, react_1.useEffect)(() => {
|
|
96
|
+
if (!bounced && open) {
|
|
97
|
+
setBounced(true);
|
|
98
|
+
}
|
|
99
|
+
}, [open, bounced]);
|
|
100
|
+
if (!open) {
|
|
101
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
102
|
+
}
|
|
103
|
+
return (react_1.default.createElement(FixedBackground, null,
|
|
104
|
+
react_1.default.createElement(ModalBase, { "data-bounced": bounced, "data-position": position, "data-topposition": topPosition, ref: ref, className: className },
|
|
105
|
+
showCloseButton && react_1.default.createElement(CloseStyled, { onClick: () => setOpen(false) }),
|
|
106
|
+
children)));
|
|
107
|
+
};
|
|
108
|
+
exports.Modal = Modal;
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
open: boolean;
|
|
5
|
-
setOpen: (b: boolean) => void;
|
|
6
|
-
children: JSX.Element | JSX.Element[];
|
|
7
|
-
position?: "left" | "center" | "right" | undefined;
|
|
8
|
-
topPosition?: "center" | "top" | "bottom" | undefined;
|
|
9
|
-
showCloseButton?: boolean | undefined;
|
|
10
|
-
closeOnMoveMouseOutside?: boolean | undefined;
|
|
11
|
-
className?: string | undefined;
|
|
12
|
-
closeOnClickOutside?: boolean | undefined;
|
|
13
|
-
}) => JSX.Element;
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './Modal';
|
|
3
|
+
export * from './Dialog';
|
|
@@ -10,99 +10,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
15
|
};
|
|
28
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const styles_1 = require("../../styles");
|
|
33
|
-
const react_1 = __importStar(require("react"));
|
|
34
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
35
|
-
const FixedBackground = styled_components_1.default.div `
|
|
36
|
-
position: fixed;
|
|
37
|
-
top: 0;
|
|
38
|
-
left: 0;
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
42
|
-
z-index: 2;
|
|
43
|
-
display: flex;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
align-items: center;
|
|
46
|
-
`;
|
|
47
|
-
const ModalBase = styled_components_1.default.div `
|
|
48
|
-
display: flex;
|
|
49
|
-
position: absolute;
|
|
50
|
-
z-index: 1;
|
|
51
|
-
background-color: white;
|
|
52
|
-
border: solid 1px transparent;
|
|
53
|
-
border-radius: 0.5rem;
|
|
54
|
-
box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.6), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
|
|
55
|
-
max-width: 95vw;
|
|
56
|
-
max-height: 95vh;
|
|
57
|
-
&[data-position='left'] {
|
|
58
|
-
left: 0;
|
|
59
|
-
}
|
|
60
|
-
&[data-position='right'] {
|
|
61
|
-
right: 0;
|
|
62
|
-
}
|
|
63
|
-
&[data-topposition='top'] {
|
|
64
|
-
top: 0;
|
|
65
|
-
}
|
|
66
|
-
&[data-topposition='bottom'] {
|
|
67
|
-
bottom: 0;
|
|
68
|
-
}
|
|
69
|
-
${(0, styles_1.bounce)('data-bounced')}
|
|
70
|
-
`;
|
|
71
|
-
exports.ModalItem = styled_components_1.default.div `
|
|
72
|
-
display: flex;
|
|
73
|
-
padding: 1rem;
|
|
74
|
-
|
|
75
|
-
&:hover {
|
|
76
|
-
background-color: #eee;
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
79
|
-
const CloseStyled = (0, styled_components_1.default)(Close_1.Close) `
|
|
80
|
-
z-index: 1;
|
|
81
|
-
`;
|
|
82
|
-
const Modal = ({ open, setOpen, children, position = 'left', topPosition = 'top', showCloseButton = true, closeOnMoveMouseOutside = false, className, closeOnClickOutside = true, }) => {
|
|
83
|
-
const [bounced, setBounced] = (0, react_1.useState)(false);
|
|
84
|
-
const ref = (0, react_1.useRef)(null);
|
|
85
|
-
(0, useOnClickOutside_1.useOnClickOutside)({
|
|
86
|
-
disabled: !open,
|
|
87
|
-
ref,
|
|
88
|
-
moveMouseOutside: closeOnMoveMouseOutside,
|
|
89
|
-
}, () => {
|
|
90
|
-
if (closeOnClickOutside && open) {
|
|
91
|
-
setOpen(false);
|
|
92
|
-
setBounced(false);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
(0, react_1.useEffect)(() => {
|
|
96
|
-
if (!bounced && open) {
|
|
97
|
-
setBounced(true);
|
|
98
|
-
}
|
|
99
|
-
}, [open, bounced]);
|
|
100
|
-
if (!open) {
|
|
101
|
-
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
102
|
-
}
|
|
103
|
-
return (react_1.default.createElement(FixedBackground, null,
|
|
104
|
-
react_1.default.createElement(ModalBase, { "data-bounced": bounced, "data-position": position, "data-topposition": topPosition, ref: ref, className: className },
|
|
105
|
-
showCloseButton && react_1.default.createElement(CloseStyled, { onClick: () => setOpen(false) }),
|
|
106
|
-
children)));
|
|
107
|
-
};
|
|
108
|
-
exports.Modal = Modal;
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./Modal"), exports);
|
|
19
|
+
__exportStar(require("./Dialog"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IModal {
|
|
3
|
+
open: boolean;
|
|
4
|
+
setOpen: (b: boolean) => void;
|
|
5
|
+
children: JSX.Element | JSX.Element[];
|
|
6
|
+
position?: 'left' | 'right' | 'center';
|
|
7
|
+
topPosition?: 'bottom' | 'top' | 'center';
|
|
8
|
+
showCloseButton?: boolean;
|
|
9
|
+
closeOnMoveMouseOutside?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
closeOnClickOutside?: boolean;
|
|
12
|
+
}
|
|
@@ -30,7 +30,7 @@ exports.PromptModal = void 0;
|
|
|
30
30
|
const Button_1 = require("../Button");
|
|
31
31
|
const FlexColumn_1 = require("../FlexColumn");
|
|
32
32
|
const FlexRow_1 = require("../FlexRow");
|
|
33
|
-
const Modal_1 = require("../Modal");
|
|
33
|
+
const Modal_1 = require("../Modal/Modal");
|
|
34
34
|
const TextEdit_1 = require("../TextEdit");
|
|
35
35
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
36
36
|
const react_dom_1 = __importDefault(require("react-dom"));
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SearchModal = void 0;
|
|
7
7
|
const Base_1 = require("./Base");
|
|
8
8
|
const styles_1 = require("../../styles");
|
|
9
|
-
const Modal_1 = require("../Modal");
|
|
9
|
+
const Modal_1 = require("../Modal/Modal");
|
|
10
10
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
11
|
const react_1 = __importDefault(require("react"));
|
|
12
12
|
const ModalStyled = (0, styled_components_1.default)(Modal_1.Modal) `
|
|
@@ -13,7 +13,7 @@ export * from './KebabDots';
|
|
|
13
13
|
export * from './Loader';
|
|
14
14
|
export * from './LoginButton';
|
|
15
15
|
export * from './LogoutButton';
|
|
16
|
-
export * from './Modal';
|
|
16
|
+
export * from './Modal/Modal';
|
|
17
17
|
export * from './Prompt';
|
|
18
18
|
export * from './RowOrColumn';
|
|
19
19
|
export * from './Search';
|
|
@@ -29,7 +29,7 @@ __exportStar(require("./KebabDots"), exports);
|
|
|
29
29
|
__exportStar(require("./Loader"), exports);
|
|
30
30
|
__exportStar(require("./LoginButton"), exports);
|
|
31
31
|
__exportStar(require("./LogoutButton"), exports);
|
|
32
|
-
__exportStar(require("./Modal"), exports);
|
|
32
|
+
__exportStar(require("./Modal/Modal"), exports);
|
|
33
33
|
__exportStar(require("./Prompt"), exports);
|
|
34
34
|
__exportStar(require("./RowOrColumn"), exports);
|
|
35
35
|
__exportStar(require("./Search"), exports);
|
|
@@ -43,15 +43,12 @@ export interface CacheItem<T> {
|
|
|
43
43
|
}
|
|
44
44
|
export interface IInitialStateCommon {
|
|
45
45
|
openApiCache?: CacheItem<any>[];
|
|
46
|
-
headerTitle?: string;
|
|
47
|
-
seed?: number;
|
|
48
46
|
}
|
|
49
47
|
export interface IRequestCommon {
|
|
50
48
|
darkMode: boolean;
|
|
51
49
|
url: LocationSubset;
|
|
52
|
-
headerTitle?: string;
|
|
53
|
-
seed?: number;
|
|
54
50
|
lang: TLang;
|
|
51
|
+
userAgent: string;
|
|
55
52
|
}
|
|
56
53
|
export interface IStateCommon<TRequest extends IRequestCommon> extends IInitialStateCommon {
|
|
57
54
|
request: TRequest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ag-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.288",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Andrei Gec <@andreigec> (https://gec.dev/)",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@types/react": "18.0.15",
|
|
47
47
|
"@types/react-dom": "18.0.6",
|
|
48
48
|
"@types/styled-components": "5.1.25",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "5.30.
|
|
50
|
-
"@typescript-eslint/parser": "5.30.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "5.30.6",
|
|
50
|
+
"@typescript-eslint/parser": "5.30.6",
|
|
51
51
|
"cross-env": "7.0.3",
|
|
52
52
|
"eslint": "8.19.0",
|
|
53
53
|
"eslint-config-airbnb-typescript": "17.0.0",
|