ag-common 0.0.374 → 0.0.375
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 +1 -1
- package/dist/api/helpers/dynamo.js +7 -3
- 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/s3.d.ts +2 -2
- package/dist/api/helpers/s3.js +1 -1
- package/dist/api/helpers/sqs.js +1 -1
- package/dist/api/helpers/validateOpenApi.d.ts +2 -2
- package/dist/api/helpers/validateOpenApi.js +4 -4
- package/dist/api/helpers/validations.js +2 -2
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/types/index.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/ui/components/BorderGradient/index.js +10 -10
- package/dist/ui/components/Button/index.js +5 -5
- package/dist/ui/components/Chevron/index.js +1 -1
- package/dist/ui/components/Close/index.js +1 -1
- package/dist/ui/components/Confirm/Dialog.js +2 -2
- package/dist/ui/components/Confirm/Modal.js +2 -2
- package/dist/ui/components/Confirm/index.d.ts +1 -1
- package/dist/ui/components/Confirm/index.js +1 -1
- package/dist/ui/components/DropdownList/Base.js +3 -3
- package/dist/ui/components/DropdownList/Dialog.js +1 -1
- package/dist/ui/components/FlexColumn/index.js +1 -1
- package/dist/ui/components/FlexRow/index.js +1 -1
- package/dist/ui/components/Icon/index.js +3 -3
- package/dist/ui/components/Image/index.js +1 -1
- package/dist/ui/components/KebabDots/index.js +2 -2
- package/dist/ui/components/Modal/Dialog.js +1 -1
- package/dist/ui/components/Modal/Modal.d.ts +1 -1
- package/dist/ui/components/Modal/Modal.js +3 -3
- package/dist/ui/components/Modal/index.d.ts +2 -2
- package/dist/ui/components/Modal/index.js +2 -2
- package/dist/ui/components/OpenApiCodeBlock/OpenApiCodeBlock.js +4 -4
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/body.js +1 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/security.js +1 -1
- package/dist/ui/components/OpenApiCodeBlock/curl/index.js +7 -7
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/call.js +1 -1
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/req.js +14 -14
- package/dist/ui/components/OpenApiCodeBlock/fetch/index.js +3 -3
- package/dist/ui/components/OpenApiCodeBlock/helpers/common.js +1 -1
- package/dist/ui/components/OpenApiCodeBlock/helpers/joinJsx.js +1 -1
- package/dist/ui/components/ProgressBar/index.js +1 -1
- package/dist/ui/components/Prompt/Dialog.js +1 -1
- package/dist/ui/components/Prompt/Modal.js +2 -2
- package/dist/ui/components/RowOrColumn/index.js +2 -2
- package/dist/ui/components/Search/Base.js +5 -5
- package/dist/ui/components/Search/Dialog.js +2 -2
- package/dist/ui/components/Search/Inline.js +1 -1
- package/dist/ui/components/Search/Modal.js +3 -3
- package/dist/ui/components/Search/index.d.ts +2 -2
- package/dist/ui/components/Search/index.js +2 -2
- package/dist/ui/components/Sidebar/index.js +2 -2
- package/dist/ui/components/SparkLine/index.js +2 -2
- package/dist/ui/components/Table/index.js +2 -2
- package/dist/ui/components/TextEdit/CheckboxEdit.js +8 -8
- package/dist/ui/components/TextEdit/ColourEdit.js +6 -6
- package/dist/ui/components/TextEdit/LengthBox.js +1 -1
- package/dist/ui/components/TextEdit/ListboxEdit.js +5 -5
- package/dist/ui/components/TextEdit/RadioGroup.js +5 -5
- package/dist/ui/components/TextEdit/TextEdit.d.ts +1 -1
- package/dist/ui/components/TextEdit/TextEdit.js +14 -14
- package/dist/ui/components/TextEdit/common.js +2 -2
- package/dist/ui/components/TextWithButton/index.js +1 -1
- package/dist/ui/components/Toast/index.js +1 -1
- package/dist/ui/components/UserImage/index.js +3 -3
- package/dist/ui/helpers/axiosHelper.js +2 -2
- package/dist/ui/helpers/callOpenApi/cached.d.ts +2 -2
- package/dist/ui/helpers/callOpenApi/cached.js +3 -3
- package/dist/ui/helpers/callOpenApi/direct.d.ts +1 -1
- package/dist/ui/helpers/callOpenApi/direct.js +4 -4
- package/dist/ui/helpers/callOpenApi/hook.d.ts +2 -2
- package/dist/ui/helpers/callOpenApi/hook.js +1 -1
- package/dist/ui/helpers/callOpenApi/index.d.ts +1 -1
- package/dist/ui/helpers/callOpenApi/index.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.d.ts +1 -1
- 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 +2 -2
- package/dist/ui/helpers/useLocalStorage.js +2 -2
- package/dist/ui/helpers/useOnClickOutside.js +1 -1
- package/dist/ui/helpers/useQueryString.js +2 -2
- package/dist/ui/helpers/useResize.js +1 -1
- package/dist/ui/icons/CrossIcon.js +1 -1
- package/dist/ui/styles/common.js +2 -2
- package/dist/ui/styles/standaloneStyles.js +1 -1
- package/package.json +4 -3
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Fetch = void 0;
|
|
7
|
-
const getFetchLines_1 = require("./helpers/getFetchLines");
|
|
8
|
-
const call_1 = require("./helpers/call");
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const call_1 = require("./helpers/call");
|
|
10
|
+
const getFetchLines_1 = require("./helpers/getFetchLines");
|
|
11
11
|
const Base = styled_1.default.div `
|
|
12
12
|
white-space: pre;
|
|
13
13
|
`;
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getSecurity = exports.getBodyJson = exports.getOperation = exports.Highlight2 = exports.Highlight = void 0;
|
|
7
|
-
const common_1 = require("../../../../common");
|
|
8
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const common_1 = require("../../../../common");
|
|
9
9
|
exports.Highlight = styled_1.default.span `
|
|
10
10
|
color: green;
|
|
11
11
|
`;
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.joinJsxWithComma = exports.joinJsxWithSlash = exports.joinJsx = void 0;
|
|
7
|
-
const common_1 = require("../../../../common");
|
|
8
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const common_1 = require("../../../../common");
|
|
9
9
|
const joinJsx = (items, sep) => {
|
|
10
10
|
const ret = [];
|
|
11
11
|
items.filter(common_1.notEmpty).forEach((i, index) => {
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ProgressBar = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const styles_1 = require("../../styles");
|
|
10
10
|
const Base = styled_1.default.div `
|
|
11
11
|
position: relative;
|
|
@@ -13,9 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.PromptDialog = void 0;
|
|
16
|
-
const Modal_1 = require("./Modal");
|
|
17
16
|
const react_1 = __importDefault(require("react"));
|
|
18
17
|
const client_1 = require("react-dom/client");
|
|
18
|
+
const Modal_1 = require("./Modal");
|
|
19
19
|
const PromptDialog = (p) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
20
|
return new Promise((res) => {
|
|
21
21
|
const wrapper = document.body.appendChild(document.createElement('div'));
|
|
@@ -27,13 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.PromptModal = void 0;
|
|
30
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
30
32
|
const Button_1 = require("../Button");
|
|
31
33
|
const FlexColumn_1 = require("../FlexColumn");
|
|
32
34
|
const FlexRow_1 = require("../FlexRow");
|
|
33
35
|
const Modal_1 = require("../Modal/Modal");
|
|
34
36
|
const TextEdit_1 = require("../TextEdit");
|
|
35
|
-
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
36
|
-
const react_1 = __importStar(require("react"));
|
|
37
37
|
const Base = styled_1.default.div `
|
|
38
38
|
width: 95vw;
|
|
39
39
|
max-width: 30rem;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.RowOrColumn = void 0;
|
|
7
|
-
const media_1 = require("../../styles/media");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const media_1 = require("../../styles/media");
|
|
10
10
|
const Base = styled_1.default.div `
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-flow: row wrap;
|
|
@@ -27,14 +27,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.SearchBase = void 0;
|
|
30
|
-
const CrossIcon_1 = require("../../icons/CrossIcon");
|
|
31
|
-
const helpers_1 = require("../../helpers");
|
|
32
|
-
const TextEdit_1 = require("../TextEdit");
|
|
33
|
-
const styles_1 = require("../../styles");
|
|
34
30
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
35
31
|
const react_1 = __importStar(require("react"));
|
|
36
|
-
const Magnify_1 = require("../../icons/Magnify");
|
|
37
32
|
const common_1 = require("../../../common");
|
|
33
|
+
const helpers_1 = require("../../helpers");
|
|
34
|
+
const CrossIcon_1 = require("../../icons/CrossIcon");
|
|
35
|
+
const Magnify_1 = require("../../icons/Magnify");
|
|
36
|
+
const styles_1 = require("../../styles");
|
|
37
|
+
const TextEdit_1 = require("../TextEdit");
|
|
38
38
|
const Base = styled_1.default.div `
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-flow: column;
|
|
@@ -13,10 +13,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.SearchDialog = void 0;
|
|
16
|
-
const Modal_1 = require("./Modal");
|
|
17
|
-
const common_1 = require("../../../common");
|
|
18
16
|
const react_1 = __importDefault(require("react"));
|
|
19
17
|
const client_1 = require("react-dom/client");
|
|
18
|
+
const common_1 = require("../../../common");
|
|
19
|
+
const Modal_1 = require("./Modal");
|
|
20
20
|
/**
|
|
21
21
|
* opens a searchmodal programatically, and resolves to either undefined, or the selected item
|
|
22
22
|
* @param p
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SearchInline = void 0;
|
|
7
|
-
const Base_1 = require("./Base");
|
|
8
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const Base_1 = require("./Base");
|
|
9
9
|
const SearchInline = (p) => react_1.default.createElement(Base_1.SearchBase, Object.assign({}, p));
|
|
10
10
|
exports.SearchInline = SearchInline;
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SearchModal = void 0;
|
|
7
|
-
const Base_1 = require("./Base");
|
|
8
|
-
const styles_1 = require("../../styles");
|
|
9
|
-
const Modal_1 = require("../Modal/Modal");
|
|
10
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
11
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const styles_1 = require("../../styles");
|
|
10
|
+
const Modal_1 = require("../Modal/Modal");
|
|
11
|
+
const Base_1 = require("./Base");
|
|
12
12
|
const ModalStyled = (0, styled_1.default)(Modal_1.Modal) `
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-flow: column;
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./Modal"), exports);
|
|
19
17
|
__exportStar(require("./Dialog"), exports);
|
|
20
18
|
__exportStar(require("./Inline"), exports);
|
|
19
|
+
__exportStar(require("./Modal"), exports);
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
@@ -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 styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
7
9
|
const use_1 = require("../../helpers/cookie/use");
|
|
8
10
|
const common_1 = require("../../styles/common");
|
|
9
11
|
const Chevron_1 = require("../Chevron");
|
|
10
|
-
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
12
|
const Base = styled_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.SparkLine = void 0;
|
|
7
|
-
const math_1 = require("../../../common/helpers/math");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const math_1 = require("../../../common/helpers/math");
|
|
10
10
|
const Base = styled_1.default.div `
|
|
11
11
|
width: calc(100% - 2px - 1rem);
|
|
12
12
|
height: 100%;
|
|
@@ -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");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const groupBy_1 = require("../../../common/helpers/groupBy");
|
|
10
10
|
const Base = styled_1.default.div `
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-flow: column;
|
|
@@ -27,14 +27,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.CheckboxEdit = void 0;
|
|
30
|
-
const common_1 = require("./common");
|
|
31
|
-
const common_2 = require("../../styles/common");
|
|
32
|
-
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
33
|
-
const FlexRow_1 = require("../FlexRow");
|
|
34
30
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
35
31
|
const react_1 = __importStar(require("react"));
|
|
32
|
+
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
36
33
|
const Save_1 = require("../../icons/Save");
|
|
37
34
|
const Undo_1 = require("../../icons/Undo");
|
|
35
|
+
const common_1 = require("../../styles/common");
|
|
36
|
+
const FlexRow_1 = require("../FlexRow");
|
|
37
|
+
const common_2 = require("./common");
|
|
38
38
|
const Icons = (0, styled_1.default)(FlexRow_1.FlexRow) `
|
|
39
39
|
position: absolute;
|
|
40
40
|
top: 0;
|
|
@@ -52,8 +52,8 @@ const CheckboxEdit = ({ defaultValue, onSubmit, noGrow = false, allowUndo = true
|
|
|
52
52
|
onSubmit(value);
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
return (react_1.default.createElement(
|
|
56
|
-
react_1.default.createElement(
|
|
55
|
+
return (react_1.default.createElement(common_2.ValueBox, Object.assign({}, common_1.noDrag, { ref: ref, "data-nogrow": noGrow }),
|
|
56
|
+
react_1.default.createElement(common_2.ValueInputCB, { type: "checkbox", "data-type": "checkbox", checked: value, onChange: () => {
|
|
57
57
|
if (allowUndo) {
|
|
58
58
|
setValue(!value);
|
|
59
59
|
}
|
|
@@ -62,9 +62,9 @@ const CheckboxEdit = ({ defaultValue, onSubmit, noGrow = false, allowUndo = true
|
|
|
62
62
|
}
|
|
63
63
|
}, onKeyPress: (e) => e.key === 'Enter' && value !== defaultValue && onSubmit(value) }),
|
|
64
64
|
allowUndo && value !== defaultValue && (react_1.default.createElement(Icons, { center: true, enableOverflow: true },
|
|
65
|
-
react_1.default.createElement(
|
|
65
|
+
react_1.default.createElement(common_2.IconD, { style: common_2.iconLeft, onClick: () => value !== defaultValue && onSubmit(value) },
|
|
66
66
|
react_1.default.createElement(Save_1.Save, null)),
|
|
67
|
-
react_1.default.createElement(
|
|
67
|
+
react_1.default.createElement(common_2.IconD, { style: common_2.iconRight, onClick: () => setValue(defaultValue) },
|
|
68
68
|
react_1.default.createElement(Undo_1.Undo, null))))));
|
|
69
69
|
};
|
|
70
70
|
exports.CheckboxEdit = CheckboxEdit;
|
|
@@ -24,12 +24,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ColourEdit = void 0;
|
|
27
|
-
const common_1 = require("./common");
|
|
28
|
-
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
29
|
-
const common_2 = require("../../styles/common");
|
|
30
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
+
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
31
29
|
const Save_1 = require("../../icons/Save");
|
|
32
30
|
const Undo_1 = require("../../icons/Undo");
|
|
31
|
+
const common_1 = require("../../styles/common");
|
|
32
|
+
const common_2 = require("./common");
|
|
33
33
|
const ColourEdit = ({ defaultValue, onSubmit, }) => {
|
|
34
34
|
const ref = (0, react_1.useRef)(null);
|
|
35
35
|
const [value, setValue] = (0, react_1.useState)(defaultValue);
|
|
@@ -42,11 +42,11 @@ const ColourEdit = ({ defaultValue, onSubmit, }) => {
|
|
|
42
42
|
onSubmit(value);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
return (react_1.default.createElement(
|
|
45
|
+
return (react_1.default.createElement(common_2.ValueBox, Object.assign({}, common_1.noDrag, { ref: ref }),
|
|
46
46
|
react_1.default.createElement("input", { type: "color", size: 5, value: value, onChange: (v) => setValue(v.target.value) }),
|
|
47
|
-
value !== defaultValue && (react_1.default.createElement(
|
|
47
|
+
value !== defaultValue && (react_1.default.createElement(common_2.IconD, { style: common_2.iconLeft, onClick: () => valueChange && onSubmit(value.trim()) },
|
|
48
48
|
react_1.default.createElement(Save_1.Save, null))),
|
|
49
|
-
valueChange && (react_1.default.createElement(
|
|
49
|
+
valueChange && (react_1.default.createElement(common_2.IconD, { style: common_2.iconRight, onClick: () => setValue(defaultValue) },
|
|
50
50
|
react_1.default.createElement(Undo_1.Undo, null)))));
|
|
51
51
|
};
|
|
52
52
|
exports.ColourEdit = ColourEdit;
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.TextEditLengthBox = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
7
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const Base = styled_1.default.div `
|
|
10
10
|
/* position: absolute;
|
|
11
11
|
bottom: 0.5rem;
|
|
@@ -24,11 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ListboxEdit = void 0;
|
|
27
|
-
const common_1 = require("./common");
|
|
28
|
-
const common_2 = require("../../styles/common");
|
|
29
27
|
const react_1 = __importStar(require("react"));
|
|
30
28
|
const Save_1 = require("../../icons/Save");
|
|
31
29
|
const Undo_1 = require("../../icons/Undo");
|
|
30
|
+
const common_1 = require("../../styles/common");
|
|
31
|
+
const common_2 = require("./common");
|
|
32
32
|
const ListboxEdit = ({ defaultValue, onSubmit, values, canEdit = true,
|
|
33
33
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
34
|
renderLabel = (e) => e.toString(), }) => {
|
|
@@ -36,7 +36,7 @@ renderLabel = (e) => e.toString(), }) => {
|
|
|
36
36
|
(0, react_1.useEffect)(() => {
|
|
37
37
|
setValue(defaultValue);
|
|
38
38
|
}, [defaultValue]);
|
|
39
|
-
return (react_1.default.createElement(
|
|
39
|
+
return (react_1.default.createElement(common_2.ValueBox, Object.assign({}, common_1.noDrag),
|
|
40
40
|
react_1.default.createElement("select", { size: 5,
|
|
41
41
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
42
|
value: value.toString(), onChange: (v) => {
|
|
@@ -50,9 +50,9 @@ renderLabel = (e) => e.toString(), }) => {
|
|
|
50
50
|
key: v.toString(),
|
|
51
51
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
52
|
value: v.toString() }, renderLabel(v))))),
|
|
53
|
-
canEdit && value !== defaultValue && (react_1.default.createElement(
|
|
53
|
+
canEdit && value !== defaultValue && (react_1.default.createElement(common_2.IconD, { style: common_2.iconLeft, onClick: () => value !== defaultValue && onSubmit(value) },
|
|
54
54
|
react_1.default.createElement(Save_1.Save, null))),
|
|
55
|
-
canEdit && value !== defaultValue && (react_1.default.createElement(
|
|
55
|
+
canEdit && value !== defaultValue && (react_1.default.createElement(common_2.IconD, { style: common_2.iconRight, onClick: () => setValue(defaultValue) },
|
|
56
56
|
react_1.default.createElement(Undo_1.Undo, null)))));
|
|
57
57
|
};
|
|
58
58
|
exports.ListboxEdit = ListboxEdit;
|
|
@@ -27,11 +27,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.RadioGroup = void 0;
|
|
30
|
-
const common_1 = require("./common");
|
|
31
|
-
const FlexColumn_1 = require("../FlexColumn");
|
|
32
|
-
const common_2 = require("../../styles/common");
|
|
33
|
-
const react_1 = __importStar(require("react"));
|
|
34
30
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const common_1 = require("../../styles/common");
|
|
33
|
+
const FlexColumn_1 = require("../FlexColumn");
|
|
34
|
+
const common_2 = require("./common");
|
|
35
35
|
const Label = styled_1.default.label ``;
|
|
36
36
|
const RadioGroup = ({ defaultValue, onSubmit, values,
|
|
37
37
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -45,7 +45,7 @@ renderValue = (e) => e.toString(), }) => {
|
|
|
45
45
|
setValue(rv);
|
|
46
46
|
}
|
|
47
47
|
}, [defaultValue, renderValue, value]);
|
|
48
|
-
return (react_1.default.createElement(
|
|
48
|
+
return (react_1.default.createElement(common_2.ValueBox, Object.assign({}, common_1.noDrag), values.map((v) => (
|
|
49
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
50
|
react_1.default.createElement(FlexColumn_1.FlexColumn, { key: v.toString() },
|
|
51
51
|
react_1.default.createElement(Label, null, renderLabel(v)),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IRefTextEdit, ITextEdit } from './types';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { IRefTextEdit, ITextEdit } from './types';
|
|
3
3
|
export declare const ValueReadonly: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: React.ElementType<any> | undefined;
|
|
@@ -28,19 +28,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.TextEdit = exports.ValueReadonly = void 0;
|
|
30
30
|
/* eslint-disable react/display-name */
|
|
31
|
-
const common_1 = require("./common");
|
|
32
|
-
const LengthBox_1 = require("./LengthBox");
|
|
33
|
-
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
34
|
-
const common_2 = require("../../styles/common");
|
|
35
|
-
const dom_1 = require("../../helpers/dom");
|
|
36
|
-
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
37
31
|
const react_1 = require("@emotion/react");
|
|
32
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
38
33
|
const react_2 = __importStar(require("react"));
|
|
34
|
+
const dom_1 = require("../../helpers/dom");
|
|
35
|
+
const useOnClickOutside_1 = require("../../helpers/useOnClickOutside");
|
|
39
36
|
const Pencil_1 = require("../../icons/Pencil");
|
|
40
37
|
const Save_1 = require("../../icons/Save");
|
|
41
38
|
const Undo_1 = require("../../icons/Undo");
|
|
39
|
+
const common_1 = require("../../styles/common");
|
|
40
|
+
const common_2 = require("./common");
|
|
41
|
+
const LengthBox_1 = require("./LengthBox");
|
|
42
42
|
exports.ValueReadonly = styled_1.default.div `
|
|
43
|
-
${
|
|
43
|
+
${common_2.valueCss};
|
|
44
44
|
word-break: break-word;
|
|
45
45
|
flex-basis: calc(100% - 3rem);
|
|
46
46
|
`;
|
|
@@ -48,7 +48,7 @@ const basecss = (0, react_1.css) `
|
|
|
48
48
|
outline: none;
|
|
49
49
|
border: 0;
|
|
50
50
|
word-break: break-word;
|
|
51
|
-
${
|
|
51
|
+
${common_2.valueCss};
|
|
52
52
|
resize: none;
|
|
53
53
|
overflow: hidden;
|
|
54
54
|
background-color: white;
|
|
@@ -68,7 +68,7 @@ const ValueTextArea = styled_1.default.textarea `
|
|
|
68
68
|
const ValueTextBox = styled_1.default.input `
|
|
69
69
|
${basecss}
|
|
70
70
|
`;
|
|
71
|
-
const ValueBoxEdit = (0, styled_1.default)(
|
|
71
|
+
const ValueBoxEdit = (0, styled_1.default)(common_2.ValueBox) `
|
|
72
72
|
border: solid 1px #ccc;
|
|
73
73
|
`;
|
|
74
74
|
const Right = styled_1.default.div `
|
|
@@ -130,10 +130,10 @@ exports.TextEdit = (0, react_2.forwardRef)((p, ref) => {
|
|
|
130
130
|
}
|
|
131
131
|
}, [defaultEditing === null || defaultEditing === void 0 ? void 0 : defaultEditing.focus]);
|
|
132
132
|
if (!editing || disableEdit) {
|
|
133
|
-
return (react_2.default.createElement(
|
|
133
|
+
return (react_2.default.createElement(common_2.ValueBox, Object.assign({}, common_1.noDrag, { className: className, "data-editing": "false", onClick: () => onClickNotEditing === null || onClickNotEditing === void 0 ? void 0 : onClickNotEditing(), "data-pointer": onClickNotEditing ? 'true' : 'false', "data-nogrow": noGrow }, (0, dom_1.filterDataProps)(p)),
|
|
134
134
|
leftContent || null,
|
|
135
135
|
react_2.default.createElement(exports.ValueReadonly, { "data-type": "text" }, value || react_2.default.createElement("span", { style: { color: '#ccc' } }, placeholder)),
|
|
136
|
-
react_2.default.createElement(Right, null, !disableEdit && (react_2.default.createElement(Icon, { style:
|
|
136
|
+
react_2.default.createElement(Right, null, !disableEdit && (react_2.default.createElement(Icon, { style: common_2.iconRight, onClick: (e) => {
|
|
137
137
|
e.stopPropagation();
|
|
138
138
|
setEditing(true);
|
|
139
139
|
} },
|
|
@@ -141,7 +141,7 @@ exports.TextEdit = (0, react_2.forwardRef)((p, ref) => {
|
|
|
141
141
|
}
|
|
142
142
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
143
143
|
const Comp = !singleLine ? ValueTextArea : ValueTextBox;
|
|
144
|
-
return (react_2.default.createElement(ValueBoxEdit, Object.assign({},
|
|
144
|
+
return (react_2.default.createElement(ValueBoxEdit, Object.assign({}, common_1.noDrag, { className: className, "data-editing": "true",
|
|
145
145
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
146
|
ref: ref, tabIndex: -1, "data-nogrow": noGrow }, (0, dom_1.filterDataProps)(p)),
|
|
147
147
|
leftContent || null,
|
|
@@ -165,9 +165,9 @@ exports.TextEdit = (0, react_2.forwardRef)((p, ref) => {
|
|
|
165
165
|
maxLength && (react_2.default.createElement(Right, { "data-singleline": singleLine },
|
|
166
166
|
react_2.default.createElement(LengthBox_1.TextEditLengthBox, { min: value.length, max: maxLength }))),
|
|
167
167
|
allowUndo && (react_2.default.createElement(Right, null,
|
|
168
|
-
valueChange && (react_2.default.createElement(Icon, { style:
|
|
168
|
+
valueChange && (react_2.default.createElement(Icon, { style: common_2.iconLeft, onClick: () => valueChange && onSubmit(value, false) },
|
|
169
169
|
react_2.default.createElement(Save_1.Save, null))),
|
|
170
|
-
(valueChange || editing !== !!defaultEditing) && (react_2.default.createElement(Icon, { style:
|
|
170
|
+
(valueChange || editing !== !!defaultEditing) && (react_2.default.createElement(Icon, { style: common_2.iconRight, onClick: () => {
|
|
171
171
|
setEditing(!!defaultEditing);
|
|
172
172
|
setValue(defaultValue);
|
|
173
173
|
} },
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.iconLeft = exports.iconRight = exports.IconD = exports.ValueInputCB = exports.valueCss = exports.ValueBox = void 0;
|
|
7
|
-
const colours_1 = require("../../styles/colours");
|
|
8
|
-
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
9
7
|
const react_1 = require("@emotion/react");
|
|
8
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
9
|
+
const colours_1 = require("../../styles/colours");
|
|
10
10
|
exports.ValueBox = styled_1.default.div `
|
|
11
11
|
padding: 0.5rem;
|
|
12
12
|
|
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.TextWithButton = void 0;
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
30
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
32
|
const Base = styled_1.default.div `
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-flow: row;
|
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.ToastProvider = exports.addToast = void 0;
|
|
30
|
-
const react_hot_toast_1 = __importStar(require("react-hot-toast"));
|
|
31
30
|
const react_1 = __importDefault(require("react"));
|
|
31
|
+
const react_hot_toast_1 = __importStar(require("react-hot-toast"));
|
|
32
32
|
const addToast = (m, options) => {
|
|
33
33
|
if ((options === null || options === void 0 ? void 0 : options.appearance) === 'error') {
|
|
34
34
|
react_hot_toast_1.default.error(m, {
|
|
@@ -27,10 +27,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.UserProfileImage = exports.UserImage = void 0;
|
|
30
|
-
const log_1 = require("../../../common/helpers/log");
|
|
31
|
-
const array_1 = require("../../../common/helpers/array");
|
|
32
|
-
const react_1 = __importStar(require("react"));
|
|
33
30
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const array_1 = require("../../../common/helpers/array");
|
|
33
|
+
const log_1 = require("../../../common/helpers/log");
|
|
34
34
|
const UserOutline_1 = require("../../icons/UserOutline");
|
|
35
35
|
const Base = styled_1.default.div `
|
|
36
36
|
width: 2.5rem;
|
|
@@ -13,10 +13,10 @@ 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
|
+
const common_1 = require("../../common");
|
|
16
18
|
const log_1 = require("../../common/helpers/log");
|
|
17
19
|
const object_1 = require("../../common/helpers/object");
|
|
18
|
-
const common_1 = require("../../common");
|
|
19
|
-
const axios_1 = __importDefault(require("axios"));
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
* @param body accepts object or json, and passes as-is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ICallOpenApi, OverrideAuth } from './types';
|
|
2
|
-
import { CacheItems } from '../routes';
|
|
3
1
|
import { AxiosWrapperLite } from '../jwt';
|
|
2
|
+
import { CacheItems } from '../routes';
|
|
3
|
+
import { ICallOpenApi, OverrideAuth } from './types';
|
|
4
4
|
export type TCallOpenApiCached<T, TDefaultApi> = ICallOpenApi<T, TDefaultApi> & {
|
|
5
5
|
/**
|
|
6
6
|
* if falsey, will run callOpenApi directly
|
|
@@ -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 = exports.setOpenApiCacheRaw = void 0;
|
|
16
|
-
const direct_1 = require("./direct");
|
|
17
|
-
const string_1 = require("../../../common/helpers/string");
|
|
18
|
-
const common_1 = require("../../../common");
|
|
19
16
|
const node_cache_1 = __importDefault(require("node-cache"));
|
|
17
|
+
const common_1 = require("../../../common");
|
|
18
|
+
const string_1 = require("../../../common/helpers/string");
|
|
19
|
+
const direct_1 = require("./direct");
|
|
20
20
|
let callOpenApiCache;
|
|
21
21
|
/**
|
|
22
22
|
* cache differs per user and per SSR provided data
|
|
@@ -10,12 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.callOpenApi = exports.getIdTokenAuthHeaderRaw = void 0;
|
|
13
|
-
const cookie_1 = require("../cookie");
|
|
14
|
-
const sleep_1 = require("../../../common/helpers/sleep");
|
|
15
|
-
const array_1 = require("../../../common/helpers/array");
|
|
16
|
-
const useLocalStorage_1 = require("../useLocalStorage");
|
|
17
13
|
const axios_1 = require("axios");
|
|
18
14
|
const const_1 = require("../../../common/const");
|
|
15
|
+
const array_1 = require("../../../common/helpers/array");
|
|
16
|
+
const sleep_1 = require("../../../common/helpers/sleep");
|
|
17
|
+
const cookie_1 = require("../cookie");
|
|
18
|
+
const useLocalStorage_1 = require("../useLocalStorage");
|
|
19
19
|
/**
|
|
20
20
|
* get the id_token from provided value, or cookie, or LS
|
|
21
21
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ICallOpenApi } from './types';
|
|
2
|
-
import { CacheItems } from '../routes';
|
|
3
1
|
import { AxiosWrapper } from '../jwt';
|
|
2
|
+
import { CacheItems } from '../routes';
|
|
3
|
+
import { ICallOpenApi } from './types';
|
|
4
4
|
export type TUseCallOpenApiDispatch<A> = (value: A) => A;
|
|
5
5
|
export 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");
|
|
13
14
|
const cached_1 = require("./cached");
|
|
14
15
|
const direct_1 = require("./direct");
|
|
15
|
-
const react_1 = require("react");
|
|
16
16
|
const defaultState = (p,
|
|
17
17
|
/**
|
|
18
18
|
* default false
|
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cached"), exports);
|
|
17
18
|
__exportStar(require("./direct"), exports);
|
|
18
19
|
__exportStar(require("./helpers"), exports);
|
|
19
|
-
__exportStar(require("./cached"), exports);
|
|
20
20
|
__exportStar(require("./hook"), exports);
|
|
21
21
|
__exportStar(require("./types"), exports);
|
|
@@ -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");
|
|
5
4
|
const log_1 = require("../../../common/helpers/log");
|
|
6
5
|
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);
|