ag-common 0.0.157 → 0.0.158
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/dynamo.d.ts +2 -2
- package/dist/api/helpers/dynamo.js +1 -1
- package/dist/api/helpers/dynamoInfra.d.ts +1 -1
- package/dist/api/helpers/openApiHelpers.d.ts +2 -2
- package/dist/api/helpers/openApiHelpers.js +1 -1
- package/dist/api/helpers/validateOpenApi.js +2 -2
- package/dist/api/helpers/validations.js +3 -3
- package/dist/api/types/index.d.ts +1 -1
- package/dist/ui/components/BorderGradient/index.js +1 -1
- package/dist/ui/components/Button/index.js +1 -1
- package/dist/ui/components/Chevron/index.js +1 -1
- package/dist/ui/components/Confirm/index.js +3 -3
- package/dist/ui/components/Dropdown/index.js +2 -2
- package/dist/ui/components/DropdownList/index.js +2 -2
- package/dist/ui/components/Icon/index.js +1 -1
- package/dist/ui/components/LoginButton/index.js +1 -1
- package/dist/ui/components/LogoutButton/index.js +2 -2
- package/dist/ui/components/Modal/index.js +2 -2
- package/dist/ui/components/Prompt/index.js +3 -3
- package/dist/ui/components/RowOrColumn/index.js +1 -1
- package/dist/ui/components/SearchModal/index.js +3 -3
- package/dist/ui/components/Sidebar/index.js +2 -2
- package/dist/ui/components/Table/index.js +1 -1
- package/dist/ui/components/TextEdit/CheckboxEdit.js +2 -2
- package/dist/ui/components/TextEdit/ColourEdit.js +1 -1
- package/dist/ui/components/TextEdit/ListboxEdit.js +1 -1
- package/dist/ui/components/TextEdit/TextEdit.js +2 -2
- package/dist/ui/components/TextEdit/common.js +1 -1
- package/dist/ui/components/UserImage/index.js +2 -2
- package/dist/ui/helpers/axiosHelper.js +1 -1
- package/dist/ui/helpers/callOpenApi/cached.js +2 -2
- package/dist/ui/helpers/callOpenApi/hook.d.ts +1 -1
- package/dist/ui/helpers/callOpenApi/hook.js +1 -1
- package/dist/ui/helpers/callOpenApi/types.d.ts +1 -1
- package/dist/ui/helpers/cookie/get.js +1 -1
- package/dist/ui/helpers/cookie/set.js +2 -2
- package/dist/ui/helpers/cookie/use.js +1 -1
- package/dist/ui/helpers/date.js +1 -1
- package/dist/ui/helpers/routes.d.ts +1 -1
- package/dist/ui/helpers/routes.js +1 -1
- package/dist/ui/helpers/useLocalStorage.js +1 -1
- package/dist/ui/helpers/useQueryString.js +1 -1
- package/dist/ui/helpers/useResize.js +1 -1
- package/dist/ui/styles/common.js +1 -1
- package/dist/ui/styles/standaloneStyles.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DocumentClient } from 'aws-sdk/clients/dynamodb';
|
|
2
1
|
import { IQueryDynamo, Key } from '../types';
|
|
3
|
-
|
|
2
|
+
import AWS from 'aws-sdk';
|
|
3
|
+
export declare let dynamoDb: AWS.DynamoDB.DocumentClient;
|
|
4
4
|
export declare const setDynamo: (region: string) => void;
|
|
5
5
|
export declare const putDynamo: <T>(item: T, tableName: string) => Promise<{
|
|
6
6
|
error?: string | undefined;
|
|
@@ -13,11 +13,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.wipeTable = exports.getDynamoTtl = exports.queryDynamo = exports.getItemsDynamo = exports.getItemDynamo = exports.scan = exports.batchDelete = exports.batchWrite = exports.putDynamo = exports.setDynamo = exports.dynamoDb = void 0;
|
|
16
|
-
const aws_sdk_1 = __importDefault(require("aws-sdk"));
|
|
17
16
|
const log_1 = require("../../common/helpers/log");
|
|
18
17
|
const array_1 = require("../../common/helpers/array");
|
|
19
18
|
const sleep_1 = require("../../common/helpers/sleep");
|
|
20
19
|
const async_1 = require("../../common/helpers/async");
|
|
20
|
+
const aws_sdk_1 = __importDefault(require("aws-sdk"));
|
|
21
21
|
// eslint-disable-next-line import/no-mutable-exports
|
|
22
22
|
exports.dynamoDb = new aws_sdk_1.default.DynamoDB.DocumentClient();
|
|
23
23
|
const setDynamo = (region) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Stack, aws_dynamodb as dynamodb } from 'aws-cdk-lib';
|
|
2
1
|
import { IGeneratedDynamoData } from '../types';
|
|
2
|
+
import { Stack, aws_dynamodb as dynamodb } from 'aws-cdk-lib';
|
|
3
3
|
export declare const generateTableRef: ({ stack, baseKey, hasStream, hasGSI, }: {
|
|
4
4
|
hasStream: boolean;
|
|
5
5
|
hasGSI: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aws_certificatemanager as certmgr, aws_route53 as route53 } from 'aws-cdk-lib';
|
|
2
|
-
import { Construct } from 'constructs';
|
|
3
1
|
import { ILambdaConfigs } from '../types';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
import { aws_certificatemanager as certmgr, aws_route53 as route53 } from 'aws-cdk-lib';
|
|
4
4
|
export declare const openApiImpl: (p: {
|
|
5
5
|
schema: unknown;
|
|
6
6
|
stack: Construct;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.openApiImpl = void 0;
|
|
4
4
|
/* eslint-disable no-new */
|
|
5
|
-
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
6
5
|
const array_1 = require("../../common/helpers/array");
|
|
7
6
|
const log_1 = require("../../common/helpers/log");
|
|
7
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
8
8
|
// eslint-disable-next-line
|
|
9
9
|
const getPaths = (schema) => Object.entries(schema.paths).map(([fullPath, verbs]) => ({
|
|
10
10
|
fullPath,
|
|
@@ -14,12 +14,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.validateOpenApi = void 0;
|
|
16
16
|
// eslint-disable-next-line import/no-unresolved
|
|
17
|
-
const openapi_request_validator_1 = __importDefault(require("openapi-request-validator"));
|
|
18
17
|
const validations_1 = require("./validations");
|
|
18
|
+
const api_1 = require("./api");
|
|
19
19
|
const log_1 = require("../../common/helpers/log");
|
|
20
20
|
const object_1 = require("../../common/helpers/object");
|
|
21
|
-
const api_1 = require("./api");
|
|
22
21
|
const i18n_1 = require("../../common/helpers/i18n");
|
|
22
|
+
const openapi_request_validator_1 = __importDefault(require("openapi-request-validator"));
|
|
23
23
|
//
|
|
24
24
|
const getOperation = ({ path, method, resource, schema, }) => {
|
|
25
25
|
var _a;
|
|
@@ -14,10 +14,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.getAndValidateToken = void 0;
|
|
16
16
|
/* eslint-disable import/no-unresolved */
|
|
17
|
-
const jwks_rsa_1 = __importDefault(require("jwks-rsa"));
|
|
18
|
-
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
19
|
-
const log_1 = require("../../common/helpers/log");
|
|
20
17
|
const api_1 = require("./api");
|
|
18
|
+
const log_1 = require("../../common/helpers/log");
|
|
19
|
+
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
20
|
+
const jwks_rsa_1 = __importDefault(require("jwks-rsa"));
|
|
21
21
|
let jwksClient;
|
|
22
22
|
const jwtVerify = ({ token, jwksUri, issuer, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
23
|
return new Promise((resolve, reject) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aws_dynamodb as dynamodb, aws_iam as iam, aws_lambda as lambda } from 'aws-cdk-lib';
|
|
2
1
|
import { Key } from './aws';
|
|
2
|
+
import { aws_dynamodb as dynamodb, aws_iam as iam, aws_lambda as lambda } from 'aws-cdk-lib';
|
|
3
3
|
export interface DYNAMOKEYS {
|
|
4
4
|
type: string;
|
|
5
5
|
L1: string;
|
|
@@ -23,9 +23,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.BorderGradient = void 0;
|
|
26
|
+
const colours_1 = require("../../styles/colours");
|
|
26
27
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
27
28
|
const react_1 = __importDefault(require("react"));
|
|
28
|
-
const colours_1 = require("../../styles/colours");
|
|
29
29
|
const BGcss = (0, styled_components_1.css) `
|
|
30
30
|
display: flex;
|
|
31
31
|
border: 0;
|
|
@@ -24,9 +24,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Button = exports.ButtonBase = void 0;
|
|
26
26
|
/* eslint-disable react/destructuring-assignment */
|
|
27
|
+
const colours_1 = require("../../styles/colours");
|
|
27
28
|
const react_1 = __importDefault(require("react"));
|
|
28
29
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
29
|
-
const colours_1 = require("../../styles/colours");
|
|
30
30
|
exports.ButtonBase = (0, styled_components_1.css) `
|
|
31
31
|
text-decoration: none;
|
|
32
32
|
display: flex;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Chevron = void 0;
|
|
7
|
+
const Icon_1 = require("../Icon");
|
|
7
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
9
|
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const Icon_1 = require("../Icon");
|
|
10
10
|
const SChevron = styled_components_1.default.span `
|
|
11
11
|
font-size: 2rem;
|
|
12
12
|
display: flex;
|
|
@@ -15,13 +15,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.confirm = void 0;
|
|
16
16
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
17
17
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
18
|
-
const react_1 = __importDefault(require("react"));
|
|
19
|
-
const react_dom_1 = __importDefault(require("react-dom"));
|
|
20
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
21
18
|
const Button_1 = require("../Button");
|
|
22
19
|
const FlexColumn_1 = require("../FlexColumn");
|
|
23
20
|
const FlexRow_1 = require("../FlexRow");
|
|
24
21
|
const Modal_1 = require("../Modal");
|
|
22
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
23
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
24
|
+
const react_1 = __importDefault(require("react"));
|
|
25
25
|
const Base = styled_components_1.default.div `
|
|
26
26
|
width: 95vw;
|
|
27
27
|
max-width: 30rem;
|
|
@@ -23,10 +23,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Dropdown = void 0;
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
28
26
|
const Modal_1 = require("../Modal");
|
|
29
27
|
const common_1 = require("../../styles/common");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
30
30
|
const Base = styled_components_1.default.div `
|
|
31
31
|
cursor: pointer;
|
|
32
32
|
`;
|
|
@@ -21,11 +21,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.DropdownList = void 0;
|
|
23
23
|
const colours_1 = require("../../styles/colours");
|
|
24
|
-
const react_1 = __importStar(require("react"));
|
|
25
|
-
const styled_components_1 = __importStar(require("styled-components"));
|
|
26
24
|
const Icon_1 = require("../Icon");
|
|
27
25
|
const dom_1 = require("../../helpers/dom");
|
|
28
26
|
const common_1 = require("../../styles/common");
|
|
27
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
29
|
const SBase = styled_components_1.default.div `
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-flow: row;
|
|
@@ -23,9 +23,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Icon = exports.IconF = void 0;
|
|
26
|
+
const common_1 = require("../../styles/common");
|
|
26
27
|
const react_1 = __importDefault(require("react"));
|
|
27
28
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
28
|
-
const common_1 = require("../../styles/common");
|
|
29
29
|
exports.IconF = styled_components_1.default.span `
|
|
30
30
|
transition: all 200ms;
|
|
31
31
|
display: flex;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.LoginButton = void 0;
|
|
7
|
+
const Button_1 = require("../Button");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const Button_1 = require("../Button");
|
|
10
10
|
const Base = styled_components_1.default.a `
|
|
11
11
|
${Button_1.ButtonBase}
|
|
12
12
|
`;
|
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.LogoutButton = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
7
|
const colours_1 = require("../../styles/colours");
|
|
10
8
|
const Button_1 = require("../Button");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
11
|
const Door = (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" },
|
|
12
12
|
react_1.default.createElement("path", { d: "M3 3h8V1H3a2 2 0 00-2 2v14a2 2 0 002 2h8v-2H3z" }),
|
|
13
13
|
react_1.default.createElement("path", { d: "M19 10l-6-5v4H5v2h8v4l6-5z" })));
|
|
@@ -23,10 +23,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.ModalDropList = exports.Modal = exports.ModalItem = void 0;
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
28
26
|
const Close_1 = require("../Close");
|
|
29
27
|
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
30
30
|
const FixedBackground = styled_components_1.default.div `
|
|
31
31
|
position: fixed;
|
|
32
32
|
top: 0;
|
|
@@ -34,14 +34,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
exports.prompt = void 0;
|
|
35
35
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
36
36
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
37
|
-
const react_1 = __importStar(require("react"));
|
|
38
|
-
const react_dom_1 = __importDefault(require("react-dom"));
|
|
39
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
40
37
|
const Button_1 = require("../Button");
|
|
41
38
|
const FlexColumn_1 = require("../FlexColumn");
|
|
42
39
|
const FlexRow_1 = require("../FlexRow");
|
|
43
40
|
const Modal_1 = require("../Modal");
|
|
44
41
|
const TextEdit_1 = require("../TextEdit");
|
|
42
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
43
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
44
|
+
const react_1 = __importStar(require("react"));
|
|
45
45
|
const Base = styled_components_1.default.div `
|
|
46
46
|
width: 95vw;
|
|
47
47
|
max-width: 30rem;
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.RowOrColumn = void 0;
|
|
7
7
|
/* eslint-disable react/destructuring-assignment */
|
|
8
|
+
const media_1 = require("../../styles/media");
|
|
8
9
|
const react_1 = __importDefault(require("react"));
|
|
9
10
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
-
const media_1 = require("../../styles/media");
|
|
11
11
|
const Base = styled_components_1.default.div `
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-flow: row wrap;
|
|
@@ -32,13 +32,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.searchDialog = void 0;
|
|
35
|
-
const react_1 = __importStar(require("react"));
|
|
36
|
-
const react_dom_1 = __importDefault(require("react-dom"));
|
|
37
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
38
35
|
const debounce_1 = require("../../helpers/debounce");
|
|
39
36
|
const media_1 = require("../../styles/media");
|
|
40
37
|
const Modal_1 = require("../Modal");
|
|
41
38
|
const TextEdit_1 = require("../TextEdit/TextEdit");
|
|
39
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
40
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
41
|
+
const react_1 = __importStar(require("react"));
|
|
42
42
|
const ModalStyled = (0, styled_components_1.default)(Modal_1.Modal) `
|
|
43
43
|
top: 10rem;
|
|
44
44
|
@media ${media_1.bigScreen} {
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Sidebar = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
7
|
const use_1 = require("../../helpers/cookie/use");
|
|
10
8
|
const common_1 = require("../../styles/common");
|
|
11
9
|
const Chevron_1 = require("../Chevron");
|
|
10
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
12
|
const Base = styled_components_1.default.div `
|
|
13
13
|
position: relative;
|
|
14
14
|
transition: all 200ms;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Table = void 0;
|
|
7
|
+
const groupBy_1 = require("../../../common/helpers/groupBy");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const groupBy_1 = require("../../../common/helpers/groupBy");
|
|
10
10
|
const Base = styled_components_1.default.div `
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-flow: column;
|
|
@@ -24,13 +24,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.CheckboxEdit = void 0;
|
|
26
26
|
/* eslint-disable jsx-a11y/no-onchange */
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
27
|
const images_1 = require("./images");
|
|
29
28
|
const common_1 = require("./common");
|
|
30
29
|
const common_2 = require("../../styles/common");
|
|
31
30
|
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
32
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
33
31
|
const FlexRow_1 = require("../FlexRow");
|
|
32
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
33
|
+
const react_1 = __importStar(require("react"));
|
|
34
34
|
const Icons = (0, styled_components_1.default)(FlexRow_1.FlexRow) `
|
|
35
35
|
position: absolute;
|
|
36
36
|
top: 0;
|
|
@@ -21,11 +21,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.ColourEdit = void 0;
|
|
23
23
|
/* eslint-disable jsx-a11y/no-onchange */
|
|
24
|
-
const react_1 = __importStar(require("react"));
|
|
25
24
|
const images_1 = require("./images");
|
|
26
25
|
const common_1 = require("./common");
|
|
27
26
|
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
28
27
|
const common_2 = require("../../styles/common");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
29
|
const ColourEdit = ({ defaultValue, onSubmit, }) => {
|
|
30
30
|
const ref = (0, react_1.useRef)(null);
|
|
31
31
|
const [value, setValue] = (0, react_1.useState)(defaultValue);
|
|
@@ -21,10 +21,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.ListboxEdit = void 0;
|
|
23
23
|
/* eslint-disable jsx-a11y/no-onchange */
|
|
24
|
-
const react_1 = __importStar(require("react"));
|
|
25
24
|
const images_1 = require("./images");
|
|
26
25
|
const common_1 = require("./common");
|
|
27
26
|
const common_2 = require("../../styles/common");
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
28
|
const ListboxEdit = ({ defaultValue, onSubmit, values, }) => {
|
|
29
29
|
const [value, setValue] = (0, react_1.useState)(defaultValue);
|
|
30
30
|
(0, react_1.useEffect)(() => {
|
|
@@ -21,12 +21,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.TextEdit = exports.ValueReadonly = void 0;
|
|
23
23
|
/* eslint-disable jsx-a11y/no-onchange */
|
|
24
|
-
const react_1 = __importStar(require("react"));
|
|
25
24
|
const images_1 = require("./images");
|
|
26
25
|
const common_1 = require("./common");
|
|
27
|
-
const styled_components_1 = __importStar(require("styled-components"));
|
|
28
26
|
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
29
27
|
const common_2 = require("../../styles/common");
|
|
28
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
30
30
|
exports.ValueReadonly = styled_components_1.default.div `
|
|
31
31
|
${common_1.valueCss};
|
|
32
32
|
word-break: break-word;
|
|
@@ -20,8 +20,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.iconLeft = exports.iconRight = exports.IconD = exports.ValueInputCB = exports.valueCss = exports.ValueBox = void 0;
|
|
23
|
-
const styled_components_1 = __importStar(require("styled-components"));
|
|
24
23
|
const colours_1 = require("../../styles/colours");
|
|
24
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
25
25
|
exports.ValueBox = styled_components_1.default.div `
|
|
26
26
|
padding: 0.5rem;
|
|
27
27
|
|
|
@@ -23,10 +23,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.UserProfileImage = exports.UserImage = exports.UserImageIcon = void 0;
|
|
26
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
26
|
const log_1 = require("../../../common/helpers/log");
|
|
29
27
|
const array_1 = require("../../../common/helpers/array");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
30
30
|
exports.UserImageIcon = (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" },
|
|
31
31
|
react_1.default.createElement("path", { d: "M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm0 398.7c-58.6 0-111.1-26.6-146.1-68.3 17.8-7.7 62.2-23.7 90.3-31.9 2.2-.7 2.6-.8 2.6-10.7 0-10.6-1.2-18.1-3.8-23.6-3.5-7.5-7.7-20.2-9.2-31.6-4.2-4.9-9.9-14.5-13.6-32.9-3.2-16.2-1.7-22.1.4-27.6.2-.6.5-1.2.6-1.8.8-3.7-.3-23.5-3.1-38.8-1.9-10.5.5-32.8 15-51.3 9.1-11.7 26.6-26 58-28h17.5c31.9 2 49.4 16.3 58.5 28 14.5 18.5 16.9 40.8 14.9 51.3-2.8 15.3-3.9 35-3.1 38.8.1.6.4 1.2.6 1.7 2.1 5.5 3.7 11.4.4 27.6-3.7 18.4-9.4 28-13.6 32.9-1.5 11.4-5.7 24-9.2 31.6-3.3 6.9-6.6 15.1-6.6 23.3 0 9.9.4 10 2.7 10.7 26.7 7.9 72.7 23.8 93 32.1-35 41.8-87.5 68.5-146.2 68.5z" })));
|
|
32
32
|
const Base = styled_components_1.default.div `
|
|
@@ -13,9 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.axiosHelper = void 0;
|
|
16
|
-
const axios_1 = __importDefault(require("axios"));
|
|
17
16
|
const log_1 = require("../../common/helpers/log");
|
|
18
17
|
const object_1 = require("../../common/helpers/object");
|
|
18
|
+
const axios_1 = __importDefault(require("axios"));
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
21
|
* @param body accepts object or json, and passes as-is
|
|
@@ -13,10 +13,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.callOpenApiCached = exports.callOpenApiCachedRaw = void 0;
|
|
16
|
-
const cookie_1 = require("../cookie");
|
|
17
|
-
const node_cache_1 = __importDefault(require("node-cache"));
|
|
18
16
|
const direct_1 = require("./direct");
|
|
17
|
+
const cookie_1 = require("../cookie");
|
|
19
18
|
const string_1 = require("../../../common/helpers/string");
|
|
19
|
+
const node_cache_1 = __importDefault(require("node-cache"));
|
|
20
20
|
let callOpenApiCache;
|
|
21
21
|
function getCacheKey({ cacheKey, overrideAuth, }) {
|
|
22
22
|
const authkeyPrefix = (overrideAuth === null || overrideAuth === void 0 ? void 0 : overrideAuth.id_token) ||
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AxiosWrapper } from '../jwt';
|
|
2
1
|
import { ICallOpenApi } from './types';
|
|
3
2
|
import { CacheItems } from '../routes';
|
|
3
|
+
import { AxiosWrapper } from '../jwt';
|
|
4
4
|
export declare type TUseCallOpenApiDispatch<A> = (value: A) => A;
|
|
5
5
|
export declare type TUseCallOpenApi<T> = AxiosWrapper<T> & {
|
|
6
6
|
loaded: boolean;
|
|
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.useCallOpenApi = void 0;
|
|
13
|
-
const react_1 = require("react");
|
|
14
13
|
const cached_1 = require("./cached");
|
|
15
14
|
const direct_1 = require("./direct");
|
|
15
|
+
const react_1 = require("react");
|
|
16
16
|
/**
|
|
17
17
|
* hooks+cached call to callOpenApi
|
|
18
18
|
* @param p
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCookieString = exports.getCookieRawWrapper = exports.getCookieRaw = void 0;
|
|
4
|
+
const set_1 = require("./set");
|
|
4
5
|
const log_1 = require("../../../common/helpers/log");
|
|
5
6
|
const string_1 = require("../../../common/helpers/string");
|
|
6
|
-
const set_1 = require("./set");
|
|
7
7
|
function getCookieRaw({ name, cookieDocument, }) {
|
|
8
8
|
const nameeq = `${name}=`;
|
|
9
9
|
const ca1 = cookieDocument || (typeof window !== 'undefined' && document.cookie);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setCookieString = exports.setCookieRawWrapper = exports.wipeCookies = void 0;
|
|
4
|
-
const log_1 = require("../../../common/helpers/log");
|
|
5
|
-
const string_1 = require("../../../common/helpers/string");
|
|
6
4
|
const const_1 = require("./const");
|
|
7
5
|
const get_1 = require("./get");
|
|
6
|
+
const log_1 = require("../../../common/helpers/log");
|
|
7
|
+
const string_1 = require("../../../common/helpers/string");
|
|
8
8
|
/**
|
|
9
9
|
* expiryDays <0 will delete
|
|
10
10
|
* @param param0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCookieBoolean = exports.useCookieNumber = exports.useCookieString = exports.useCookie = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
4
|
const get_1 = require("./get");
|
|
6
5
|
const set_1 = require("./set");
|
|
6
|
+
const react_1 = require("react");
|
|
7
7
|
function useCookie(p) {
|
|
8
8
|
const parse = (s) => {
|
|
9
9
|
if (!s) {
|
package/dist/ui/helpers/date.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDMY = exports.daydiffstr = void 0;
|
|
4
|
+
const plural_1 = require("./plural");
|
|
4
5
|
const date_1 = require("../../common/helpers/date");
|
|
5
6
|
const math_1 = require("../../common/helpers/math");
|
|
6
|
-
const plural_1 = require("./plural");
|
|
7
7
|
const daydiffstr = (dayticks) => {
|
|
8
8
|
const ticksSince = new Date().getTime() - dayticks;
|
|
9
9
|
const totalMinutes = (0, math_1.toFixedDown)(ticksSince / 1000 / 60, 0);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getServerReq = exports.getClientOrServerReqHref = void 0;
|
|
4
|
-
const url_1 = require("url");
|
|
5
4
|
const string_1 = require("../../common/helpers/string");
|
|
6
5
|
const object_1 = require("../../common/helpers/object");
|
|
6
|
+
const url_1 = require("url");
|
|
7
7
|
const calculateServerHref = ({ host, pathname, }) => {
|
|
8
8
|
if (!host) {
|
|
9
9
|
return undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UseLocalStorage = exports.getLocalStorageItem = exports.setLocalStorageItem = exports.clearAllLocalStorage = exports.clearLocalStorageItem = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
4
|
const log_1 = require("../../common/helpers/log");
|
|
6
5
|
const object_1 = require("../../common/helpers/object");
|
|
6
|
+
const react_1 = require("react");
|
|
7
7
|
const getTimeSeconds = () => Math.ceil(new Date().getTime() / 1000);
|
|
8
8
|
const clearLocalStorageItem = (key) => {
|
|
9
9
|
if (typeof window === 'undefined') {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useQueryStringSingle = exports.useQueryStringArray = exports.useQueryStringRaw = exports.isServer = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
4
|
const object_1 = require("../../common/helpers/object");
|
|
5
|
+
const react_1 = require("react");
|
|
6
6
|
exports.isServer = typeof window === 'undefined';
|
|
7
7
|
/**
|
|
8
8
|
* hook for query string value
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useResize = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
4
|
const media_1 = require("../styles/media");
|
|
5
|
+
const react_1 = require("react");
|
|
6
6
|
function getWindowDimensions() {
|
|
7
7
|
if (typeof window !== 'undefined') {
|
|
8
8
|
const width = window.innerWidth;
|
package/dist/ui/styles/common.js
CHANGED
|
@@ -20,8 +20,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.FullScreenPage = exports.noDrag = exports.Card = exports.FadeBottom = exports.CssTransparentBlock = exports.TextOverflowEllipsis = exports.NoTextSelect = exports.Shadow = exports.HardOutline = void 0;
|
|
23
|
-
const styled_components_1 = __importStar(require("styled-components"));
|
|
24
23
|
const colours_1 = require("./colours");
|
|
24
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
25
25
|
const HardOutline = (colour) => (0, styled_components_1.css) `
|
|
26
26
|
filter: drop-shadow(1px 1px 0px ${colour}) drop-shadow(-1px 1px 0px ${colour})
|
|
27
27
|
drop-shadow(1px -1px 0px ${colour}) drop-shadow(-1px -1px 0px ${colour});
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SOA = exports.SOCenter = exports.SOP = exports.SOB = exports.SOBR = exports.SOBase = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
7
|
const common_1 = require("./common");
|
|
9
8
|
const media_1 = require("./media");
|
|
9
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
10
|
exports.SOBase = (0, styled_components_1.default)(common_1.FullScreenPage) `
|
|
11
11
|
> h1,
|
|
12
12
|
h2,
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ag-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.158",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Andrei Gec <@andreigec> (https://gec.dev/)",
|
|
7
7
|
"repository": "github:andreigec/ag-common",
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"scripts": {
|
|
10
|
+
"format": "npx eslint --ext .ts,.tsx ./src --fix",
|
|
10
11
|
"build": "rimraf dist && yarn checklint && tsc",
|
|
11
|
-
"fix": "./node_modules/.bin/eslint --fix './src/**/*.ts' './src/**/*.tsx'",
|
|
12
12
|
"checklint": "npx eslint --ext .ts,.tsx ./src",
|
|
13
13
|
"start": "tsc --watch"
|
|
14
14
|
},
|